Changeset View
Changeset View
Standalone View
Standalone View
abstract_client.h
Show First 20 Lines • Show All 492 Lines • ▼ Show 20 Line(s) | 483 | enum Position { | |||
---|---|---|---|---|---|
493 | PositionBottomRight = PositionRight | PositionBottom | 493 | PositionBottomRight = PositionRight | PositionBottom | ||
494 | }; | 494 | }; | ||
495 | Position titlebarPosition() const; | 495 | Position titlebarPosition() const; | ||
496 | bool titlebarPositionUnderMouse() const; | 496 | bool titlebarPositionUnderMouse() const; | ||
497 | 497 | | |||
498 | // a helper for the workspace window packing. tests for screen validity and updates since in maximization case as with normal moving | 498 | // a helper for the workspace window packing. tests for screen validity and updates since in maximization case as with normal moving | ||
499 | void packTo(int left, int top); | 499 | void packTo(int left, int top); | ||
500 | 500 | | |||
501 | enum QuickTileFlag { | | |||
502 | QuickTileNone = 0, | | |||
503 | QuickTileLeft = 1, | | |||
504 | QuickTileRight = 1<<1, | | |||
505 | QuickTileTop = 1<<2, | | |||
506 | QuickTileBottom = 1<<3, | | |||
507 | QuickTileHorizontal = QuickTileLeft|QuickTileRight, | | |||
508 | QuickTileVertical = QuickTileTop|QuickTileBottom, | | |||
509 | QuickTileMaximize = QuickTileLeft|QuickTileRight|QuickTileTop|QuickTileBottom | | |||
510 | }; | | |||
511 | Q_DECLARE_FLAGS(QuickTileMode, QuickTileFlag) | | |||
512 | /** Set the quick tile mode ("snap") of this window. | 501 | /** Set the quick tile mode ("snap") of this window. | ||
513 | * This will also handle preserving and restoring of window geometry as necessary. | 502 | * This will also handle preserving and restoring of window geometry as necessary. | ||
514 | * @param mode The tile mode (left/right) to give this window. | 503 | * @param mode The tile mode (left/right) to give this window. | ||
515 | */ | 504 | */ | ||
516 | void setQuickTileMode(QuickTileMode mode, bool keyboard = false); | 505 | void setQuickTileMode(QuickTileMode mode, bool keyboard = false); | ||
517 | QuickTileMode quickTileMode() const { | 506 | QuickTileMode quickTileMode() const { | ||
518 | return QuickTileMode(m_quickTileMode); | 507 | return QuickTileMode(m_quickTileMode); | ||
519 | } | 508 | } | ||
▲ Show 20 Lines • Show All 503 Lines • ▼ Show 20 Line(s) | 987 | private: | |||
1023 | KWayland::Server::PlasmaWindowInterface *m_windowManagementInterface = nullptr; | 1012 | KWayland::Server::PlasmaWindowInterface *m_windowManagementInterface = nullptr; | ||
1024 | 1013 | | |||
1025 | AbstractClient *m_transientFor = nullptr; | 1014 | AbstractClient *m_transientFor = nullptr; | ||
1026 | QList<AbstractClient*> m_transients; | 1015 | QList<AbstractClient*> m_transients; | ||
1027 | bool m_modal = false; | 1016 | bool m_modal = false; | ||
1028 | Layer m_layer = UnknownLayer; | 1017 | Layer m_layer = UnknownLayer; | ||
1029 | 1018 | | |||
1030 | // electric border/quick tiling | 1019 | // electric border/quick tiling | ||
1031 | QuickTileMode m_electricMode = QuickTileNone; | 1020 | QuickTileMode m_electricMode = QuickTileFlag::None; | ||
1032 | bool m_electricMaximizing = false; | 1021 | bool m_electricMaximizing = false; | ||
1033 | /** The quick tile mode of this window. | 1022 | /** The quick tile mode of this window. | ||
1034 | */ | 1023 | */ | ||
1035 | int m_quickTileMode = QuickTileNone; | 1024 | int m_quickTileMode = int(QuickTileFlag::None); | ||
1036 | QTimer *m_electricMaximizingDelay = nullptr; | 1025 | QTimer *m_electricMaximizingDelay = nullptr; | ||
1037 | 1026 | | |||
1038 | // geometry | 1027 | // geometry | ||
1039 | int m_blockGeometryUpdates = 0; // > 0 = New geometry is remembered, but not actually set | 1028 | int m_blockGeometryUpdates = 0; // > 0 = New geometry is remembered, but not actually set | ||
1040 | PendingGeometry_t m_pendingGeometryUpdate = PendingGeometryNone; | 1029 | PendingGeometry_t m_pendingGeometryUpdate = PendingGeometryNone; | ||
1041 | friend class GeometryUpdatesBlocker; | 1030 | friend class GeometryUpdatesBlocker; | ||
1042 | QRect m_visibleRectBeforeGeometryUpdate; | 1031 | QRect m_visibleRectBeforeGeometryUpdate; | ||
1043 | QRect m_geometryBeforeUpdateBlocking; | 1032 | QRect m_geometryBeforeUpdateBlocking; | ||
▲ Show 20 Lines • Show All 92 Lines • ▼ Show 20 Line(s) | |||||
1136 | { | 1125 | { | ||
1137 | m_pendingGeometryUpdate = update; | 1126 | m_pendingGeometryUpdate = update; | ||
1138 | } | 1127 | } | ||
1139 | 1128 | | |||
1140 | } | 1129 | } | ||
1141 | 1130 | | |||
1142 | Q_DECLARE_METATYPE(KWin::AbstractClient*) | 1131 | Q_DECLARE_METATYPE(KWin::AbstractClient*) | ||
1143 | Q_DECLARE_METATYPE(QList<KWin::AbstractClient*>) | 1132 | Q_DECLARE_METATYPE(QList<KWin::AbstractClient*>) | ||
1144 | Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::AbstractClient::QuickTileMode) | | |||
1145 | 1133 | | |||
1146 | #endif | 1134 | #endif |