Changeset View
Changeset View
Standalone View
Standalone View
abstract_client.h
Show First 20 Lines • Show All 475 Lines • ▼ Show 20 Line(s) | 294 | public: | |||
---|---|---|---|---|---|
476 | virtual void setClientShown(bool shown); | 476 | virtual void setClientShown(bool shown); | ||
477 | Q_INVOKABLE bool untab(const QRect &toGeometry = QRect(), bool clientRemoved = false); | 477 | Q_INVOKABLE bool untab(const QRect &toGeometry = QRect(), bool clientRemoved = false); | ||
478 | /* | 478 | /* | ||
479 | * When a click is done in the decoration and it calls the group | 479 | * When a click is done in the decoration and it calls the group | ||
480 | * to change the visible client it starts to move-resize the new | 480 | * to change the visible client it starts to move-resize the new | ||
481 | * client, this function stops it. | 481 | * client, this function stops it. | ||
482 | */ | 482 | */ | ||
483 | bool isCurrentTab() const; | 483 | bool isCurrentTab() const; | ||
484 | virtual QRect geometryRestore() const = 0; | | |||
485 | /** | 484 | /** | ||
486 | * The currently applied maximize mode | 485 | * The currently applied maximize mode | ||
487 | */ | 486 | */ | ||
488 | virtual MaximizeMode maximizeMode() const = 0; | 487 | virtual MaximizeMode maximizeMode() const = 0; | ||
489 | /** | 488 | /** | ||
490 | * The maximise mode requested by the server. | 489 | * The maximise mode requested by the server. | ||
491 | * For X this always matches maximizeMode, for wayland clients it | 490 | * For X this always matches maximizeMode, for wayland clients it | ||
492 | * is asyncronous | 491 | * is asyncronous | ||
▲ Show 20 Lines • Show All 205 Lines • ▼ Show 20 Line(s) | |||||
698 | * Default implementation does nothing. | 697 | * Default implementation does nothing. | ||
699 | * | 698 | * | ||
700 | * @see providesContextHelp() | 699 | * @see providesContextHelp() | ||
701 | */ | 700 | */ | ||
702 | virtual void showContextHelp(); | 701 | virtual void showContextHelp(); | ||
703 | 702 | | |||
704 | QRect inputGeometry() const override; | 703 | QRect inputGeometry() const override; | ||
705 | 704 | | |||
705 | QRect virtualKeyboardGeometry() const; | ||||
706 | void setVirtualKeyboardGeometry(const QRect &geo); | ||||
davidedmundson: Please add a comment to say geo is relative to the global space, not the client
| |||||
707 | | ||||
706 | /** | 708 | /** | ||
707 | * Restores the AbstractClient after it had been hidden due to show on screen edge functionality. | 709 | * Restores the AbstractClient after it had been hidden due to show on screen edge functionality. | ||
708 | * The AbstractClient also gets raised (e.g. Panel mode windows can cover) and the AbstractClient | 710 | * The AbstractClient also gets raised (e.g. Panel mode windows can cover) and the AbstractClient | ||
709 | * gets informed in a window specific way that it is shown and raised again. | 711 | * gets informed in a window specific way that it is shown and raised again. | ||
710 | **/ | 712 | **/ | ||
711 | virtual void showOnScreenEdge() = 0; | 713 | virtual void showOnScreenEdge() = 0; | ||
712 | 714 | | |||
713 | QByteArray desktopFileName() const { | 715 | QByteArray desktopFileName() const { | ||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Line(s) | 764 | Q_SIGNALS: | |||
801 | void applicationMenuActiveChanged(bool); | 803 | void applicationMenuActiveChanged(bool); | ||
802 | void unresponsiveChanged(bool); | 804 | void unresponsiveChanged(bool); | ||
803 | /** | 805 | /** | ||
804 | * Emitted whenever the Client's TabGroup changed. That is whenever the Client is moved to | 806 | * Emitted whenever the Client's TabGroup changed. That is whenever the Client is moved to | ||
805 | * another group, but not when a Client gets added or removed to the Client's ClientGroup. | 807 | * another group, but not when a Client gets added or removed to the Client's ClientGroup. | ||
806 | **/ | 808 | **/ | ||
807 | void tabGroupChanged(); | 809 | void tabGroupChanged(); | ||
808 | 810 | | |||
811 | virtual void setGeometryRestore(const QRect &geo) = 0; | ||||
812 | | ||||
809 | protected: | 813 | protected: | ||
810 | AbstractClient(); | 814 | AbstractClient(); | ||
811 | void setFirstInTabBox(bool enable) { | 815 | void setFirstInTabBox(bool enable) { | ||
812 | m_firstInTabBox = enable; | 816 | m_firstInTabBox = enable; | ||
813 | } | 817 | } | ||
814 | void setIcon(const QIcon &icon); | 818 | void setIcon(const QIcon &icon); | ||
815 | void startAutoRaise(); | 819 | void startAutoRaise(); | ||
816 | void autoRaise(); | 820 | void autoRaise(); | ||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | |||||
902 | 906 | | |||
903 | // geometry handling | 907 | // geometry handling | ||
904 | void checkOffscreenPosition(QRect *geom, const QRect &screenArea); | 908 | void checkOffscreenPosition(QRect *geom, const QRect &screenArea); | ||
905 | int borderLeft() const; | 909 | int borderLeft() const; | ||
906 | int borderRight() const; | 910 | int borderRight() const; | ||
907 | int borderTop() const; | 911 | int borderTop() const; | ||
908 | int borderBottom() const; | 912 | int borderBottom() const; | ||
909 | virtual void changeMaximize(bool horizontal, bool vertical, bool adjust) = 0; | 913 | virtual void changeMaximize(bool horizontal, bool vertical, bool adjust) = 0; | ||
910 | virtual void setGeometryRestore(const QRect &geo) = 0; | 914 | virtual QRect geometryRestore() const = 0; | ||
915 | | ||||
911 | /** | 916 | /** | ||
912 | * Called from move after updating the geometry. Can be reimplemented to perform specific tasks. | 917 | * Called from move after updating the geometry. Can be reimplemented to perform specific tasks. | ||
913 | * The base implementation does nothing. | 918 | * The base implementation does nothing. | ||
914 | **/ | 919 | **/ | ||
915 | virtual void doMove(int x, int y); | 920 | virtual void doMove(int x, int y); | ||
916 | void blockGeometryUpdates(bool block); | 921 | void blockGeometryUpdates(bool block); | ||
917 | void blockGeometryUpdates(); | 922 | void blockGeometryUpdates(); | ||
918 | void unblockGeometryUpdates(); | 923 | void unblockGeometryUpdates(); | ||
▲ Show 20 Lines • Show All 229 Lines • ▼ Show 20 Line(s) | 1115 | private: | |||
1148 | QTimer *m_electricMaximizingDelay = nullptr; | 1153 | QTimer *m_electricMaximizingDelay = nullptr; | ||
1149 | 1154 | | |||
1150 | // geometry | 1155 | // geometry | ||
1151 | int m_blockGeometryUpdates = 0; // > 0 = New geometry is remembered, but not actually set | 1156 | int m_blockGeometryUpdates = 0; // > 0 = New geometry is remembered, but not actually set | ||
1152 | PendingGeometry_t m_pendingGeometryUpdate = PendingGeometryNone; | 1157 | PendingGeometry_t m_pendingGeometryUpdate = PendingGeometryNone; | ||
1153 | friend class GeometryUpdatesBlocker; | 1158 | friend class GeometryUpdatesBlocker; | ||
1154 | QRect m_visibleRectBeforeGeometryUpdate; | 1159 | QRect m_visibleRectBeforeGeometryUpdate; | ||
1155 | QRect m_geometryBeforeUpdateBlocking; | 1160 | QRect m_geometryBeforeUpdateBlocking; | ||
1161 | QRect m_virtualKeyboardGeometry; | ||||
1156 | 1162 | | |||
1157 | struct { | 1163 | struct { | ||
1158 | bool enabled = false; | 1164 | bool enabled = false; | ||
1159 | bool unrestricted = false; | 1165 | bool unrestricted = false; | ||
1160 | QPoint offset; | 1166 | QPoint offset; | ||
1161 | QPoint invertedOffset; | 1167 | QPoint invertedOffset; | ||
1162 | QRect initialGeometry; | 1168 | QRect initialGeometry; | ||
1163 | QRect geometry; | 1169 | QRect geometry; | ||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |
Please add a comment to say geo is relative to the global space, not the client