Changeset View
Changeset View
Standalone View
Standalone View
abstract_client.h
Show First 20 Lines • Show All 482 Lines • ▼ Show 20 Line(s) | 324 | public: | |||
---|---|---|---|---|---|
483 | void unminimize(bool avoid_animation = false); | 483 | void unminimize(bool avoid_animation = false); | ||
484 | bool isMinimized() const { | 484 | bool isMinimized() const { | ||
485 | return m_minimized; | 485 | return m_minimized; | ||
486 | } | 486 | } | ||
487 | virtual void setFullScreen(bool set, bool user = true); | 487 | virtual void setFullScreen(bool set, bool user = true); | ||
488 | 488 | | |||
489 | virtual void setClientShown(bool shown); | 489 | virtual void setClientShown(bool shown); | ||
490 | 490 | | |||
491 | virtual QRect geometryRestore() const = 0; | 491 | QRect geometryRestore() const; | ||
492 | /** | 492 | virtual MaximizeMode maximizeMode() const; | ||
493 | * The currently applied maximize mode | | |||
494 | */ | | |||
495 | virtual MaximizeMode maximizeMode() const = 0; | | |||
496 | /** | | |||
497 | * The maximise mode requested by the server. | | |||
498 | * For X this always matches maximizeMode, for wayland clients it | | |||
499 | * is asynchronous | | |||
500 | */ | | |||
501 | virtual MaximizeMode requestedMaximizeMode() const; | 493 | virtual MaximizeMode requestedMaximizeMode() const; | ||
502 | void maximize(MaximizeMode); | 494 | void maximize(MaximizeMode); | ||
503 | /** | 495 | /** | ||
504 | * Sets the maximization according to @p vertically and @p horizontally. | 496 | * Sets the maximization according to @p vertically and @p horizontally. | ||
505 | */ | 497 | */ | ||
506 | Q_INVOKABLE void setMaximize(bool vertically, bool horizontally); | 498 | Q_INVOKABLE void setMaximize(bool vertically, bool horizontally); | ||
507 | virtual bool noBorder() const = 0; | 499 | virtual bool noBorder() const = 0; | ||
508 | virtual void setNoBorder(bool set) = 0; | 500 | virtual void setNoBorder(bool set) = 0; | ||
Show All 26 Lines | |||||
535 | /** | 527 | /** | ||
536 | * Default implementation does nothing | 528 | * Default implementation does nothing | ||
537 | */ | 529 | */ | ||
538 | virtual void setShade(ShadeMode mode); | 530 | virtual void setShade(ShadeMode mode); | ||
539 | /** | 531 | /** | ||
540 | * Whether the Client can be shaded. Default implementation returns @c false. | 532 | * Whether the Client can be shaded. Default implementation returns @c false. | ||
541 | */ | 533 | */ | ||
542 | virtual bool isShadeable() const; | 534 | virtual bool isShadeable() const; | ||
543 | /** | 535 | virtual bool isMaximizable() const; | ||
544 | * Returns whether the window is maximizable or not. | | |||
545 | */ | | |||
546 | virtual bool isMaximizable() const = 0; | | |||
547 | virtual bool isMinimizable() const; | 536 | virtual bool isMinimizable() const; | ||
548 | virtual QRect iconGeometry() const; | 537 | virtual QRect iconGeometry() const; | ||
549 | virtual bool userCanSetFullScreen() const; | 538 | virtual bool userCanSetFullScreen() const; | ||
550 | virtual bool userCanSetNoBorder() const = 0; | 539 | virtual bool userCanSetNoBorder() const = 0; | ||
551 | virtual void checkNoBorder(); | 540 | virtual void checkNoBorder(); | ||
552 | virtual void setOnActivities(QStringList newActivitiesList); | 541 | virtual void setOnActivities(QStringList newActivitiesList); | ||
553 | virtual void setOnAllActivities(bool set) = 0; | 542 | virtual void setOnAllActivities(bool set) = 0; | ||
554 | const WindowRules* rules() const { | 543 | const WindowRules* rules() const { | ||
▲ Show 20 Lines • Show All 467 Lines • ▼ Show 20 Line(s) | 920 | protected: | |||
1022 | } | 1011 | } | ||
1023 | 1012 | | |||
1024 | // geometry handling | 1013 | // geometry handling | ||
1025 | void checkOffscreenPosition(QRect *geom, const QRect &screenArea); | 1014 | void checkOffscreenPosition(QRect *geom, const QRect &screenArea); | ||
1026 | int borderLeft() const; | 1015 | int borderLeft() const; | ||
1027 | int borderRight() const; | 1016 | int borderRight() const; | ||
1028 | int borderTop() const; | 1017 | int borderTop() const; | ||
1029 | int borderBottom() const; | 1018 | int borderBottom() const; | ||
1030 | virtual void changeMaximize(bool horizontal, bool vertical, bool adjust) = 0; | 1019 | virtual void changeMaximize(bool horizontal, bool vertical, bool adjust); | ||
1031 | virtual void setGeometryRestore(const QRect &geo) = 0; | 1020 | void setGeometryRestore(const QRect &rect); | ||
1032 | 1021 | | |||
1033 | /** | 1022 | /** | ||
1034 | * Called from move after updating the geometry. Can be reimplemented to perform specific tasks. | 1023 | * Called from move after updating the geometry. Can be reimplemented to perform specific tasks. | ||
1035 | * The base implementation does nothing. | 1024 | * The base implementation does nothing. | ||
1036 | */ | 1025 | */ | ||
1037 | virtual void doMove(int x, int y); | 1026 | virtual void doMove(int x, int y); | ||
1038 | void blockGeometryUpdates(bool block); | 1027 | void blockGeometryUpdates(bool block); | ||
1039 | void blockGeometryUpdates(); | 1028 | void blockGeometryUpdates(); | ||
▲ Show 20 Lines • Show All 224 Lines • ▼ Show 20 Line(s) | 1213 | private: | |||
1264 | int m_blockGeometryUpdates = 0; // > 0 = New geometry is remembered, but not actually set | 1253 | int m_blockGeometryUpdates = 0; // > 0 = New geometry is remembered, but not actually set | ||
1265 | PendingGeometry_t m_pendingGeometryUpdate = PendingGeometryNone; | 1254 | PendingGeometry_t m_pendingGeometryUpdate = PendingGeometryNone; | ||
1266 | friend class GeometryUpdatesBlocker; | 1255 | friend class GeometryUpdatesBlocker; | ||
1267 | QRect m_visibleRectBeforeGeometryUpdate; | 1256 | QRect m_visibleRectBeforeGeometryUpdate; | ||
1268 | QRect m_bufferGeometryBeforeUpdateBlocking; | 1257 | QRect m_bufferGeometryBeforeUpdateBlocking; | ||
1269 | QRect m_frameGeometryBeforeUpdateBlocking; | 1258 | QRect m_frameGeometryBeforeUpdateBlocking; | ||
1270 | QRect m_virtualKeyboardGeometry; | 1259 | QRect m_virtualKeyboardGeometry; | ||
1271 | QRect m_keyboardGeometryRestore; | 1260 | QRect m_keyboardGeometryRestore; | ||
1261 | QRect m_maximizeGeometryRestore; | ||||
1272 | 1262 | | |||
1273 | struct { | 1263 | struct { | ||
1274 | bool enabled = false; | 1264 | bool enabled = false; | ||
1275 | bool unrestricted = false; | 1265 | bool unrestricted = false; | ||
1276 | QPoint offset; | 1266 | QPoint offset; | ||
1277 | QPoint invertedOffset; | 1267 | QPoint invertedOffset; | ||
1278 | QRect initialGeometry; | 1268 | QRect initialGeometry; | ||
1279 | QRect geometry; | 1269 | QRect geometry; | ||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |