Changeset View
Changeset View
Standalone View
Standalone View
xdgshellclient.h
Show All 16 Lines | |||||
17 | GNU General Public License for more details. | 17 | GNU General Public License for more details. | ||
18 | 18 | | |||
19 | You should have received a copy of the GNU General Public License | 19 | You should have received a copy of the GNU General Public License | ||
20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | *********************************************************************/ | 21 | *********************************************************************/ | ||
22 | 22 | | |||
23 | #pragma once | 23 | #pragma once | ||
24 | 24 | | |||
25 | #include "abstract_client.h" | 25 | #include "waylandclient.h" | ||
26 | 26 | | |||
27 | #include <KWaylandServer/xdgshell_interface.h> | 27 | #include <KWaylandServer/xdgshell_interface.h> | ||
28 | 28 | | |||
29 | #include <QQueue> | ||||
30 | #include <QTimer> | ||||
31 | | ||||
29 | namespace KWaylandServer | 32 | namespace KWaylandServer | ||
30 | { | 33 | { | ||
31 | class ServerSideDecorationInterface; | | |||
32 | class ServerSideDecorationPaletteInterface; | | |||
33 | class AppMenuInterface; | 34 | class AppMenuInterface; | ||
34 | class PlasmaShellSurfaceInterface; | 35 | class PlasmaShellSurfaceInterface; | ||
35 | class XdgDecorationInterface; | 36 | class ServerSideDecorationInterface; | ||
37 | class ServerSideDecorationPaletteInterface; | ||||
38 | class XdgToplevelDecorationV1Interface; | ||||
36 | } | 39 | } | ||
37 | 40 | | |||
38 | namespace KWin | 41 | namespace KWin | ||
39 | { | 42 | { | ||
40 | 43 | | |||
41 | /** | 44 | class XdgSurfaceConfigure | ||
42 | * @brief The reason for which the server pinged a client surface | 45 | { | ||
43 | */ | 46 | public: | ||
44 | enum class PingReason { | 47 | enum ConfigureField { | ||
45 | CloseWindow = 0, | 48 | PositionField = 0x1, | ||
46 | FocusWindow | 49 | SizeField = 0x2, | ||
50 | }; | ||||
51 | Q_DECLARE_FLAGS(ConfigureFields, ConfigureField) | ||||
52 | | ||||
53 | ConfigureFields presentFields; | ||||
54 | QPoint position; | ||||
55 | QSize size; | ||||
56 | qreal serial; | ||||
47 | }; | 57 | }; | ||
48 | 58 | | |||
49 | class KWIN_EXPORT XdgShellClient : public AbstractClient | 59 | class XdgSurfaceClient : public WaylandClient | ||
50 | { | 60 | { | ||
51 | Q_OBJECT | 61 | Q_OBJECT | ||
52 | 62 | | |||
53 | public: | 63 | public: | ||
54 | XdgShellClient(KWaylandServer::XdgShellSurfaceInterface *surface); | 64 | explicit XdgSurfaceClient(KWaylandServer::XdgSurfaceInterface *shellSurface); | ||
55 | XdgShellClient(KWaylandServer::XdgShellPopupInterface *surface); | 65 | ~XdgSurfaceClient() override; | ||
56 | ~XdgShellClient() override; | | |||
57 | 66 | | |||
58 | QRect inputGeometry() const override; | 67 | QRect inputGeometry() const override; | ||
59 | QRect bufferGeometry() const override; | 68 | QRect bufferGeometry() const override; | ||
60 | QStringList activities() const override; | | |||
61 | QPoint clientContentPos() const override; | | |||
62 | QSize clientSize() const override; | 69 | QSize clientSize() const override; | ||
70 | QMatrix4x4 inputTransformation() const override; | ||||
71 | void setFrameGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet) override; | ||||
72 | using AbstractClient::move; | ||||
73 | void move(int x, int y, ForceGeometry_t force = NormalGeometrySet) override; | ||||
74 | bool isShown(bool shaded_is_shown) const override; | ||||
75 | bool isHiddenInternal() const override; | ||||
76 | void hideClient(bool hide) override; | ||||
77 | void destroyClient() override; | ||||
78 | | ||||
79 | QRect frameRectToBufferRect(const QRect &rect) const; | ||||
80 | QRect requestedFrameGeometry() const; | ||||
81 | QPoint requestedPos() const; | ||||
82 | QSize requestedSize() const; | ||||
83 | QRect requestedClientGeometry() const; | ||||
84 | QSize requestedClientSize() const; | ||||
85 | QRect clientGeometry() const; | ||||
86 | bool isClosing() const; | ||||
87 | bool isHidden() const; | ||||
88 | bool isUnmapped() const; | ||||
89 | | ||||
90 | Q_SIGNALS: | ||||
91 | void windowMapped(); | ||||
92 | void windowUnmapped(); | ||||
93 | | ||||
94 | protected: | ||||
95 | void addDamage(const QRegion &damage) override; | ||||
96 | | ||||
97 | virtual XdgSurfaceConfigure *sendRoleConfigure() const = 0; | ||||
98 | virtual void handleRoleCommit(); | ||||
99 | | ||||
100 | XdgSurfaceConfigure *lastAcknowledgedConfigure() const; | ||||
101 | void scheduleConfigure(); | ||||
102 | void sendConfigure(); | ||||
103 | void requestGeometry(const QRect &rect); | ||||
104 | void updateGeometry(const QRect &rect); | ||||
105 | | ||||
106 | private: | ||||
107 | void handleConfigureAcknowledged(quint32 serial); | ||||
108 | void handleCommit(); | ||||
109 | void handleNextWindowGeometry(); | ||||
110 | bool haveNextWindowGeometry() const; | ||||
111 | void setHaveNextWindowGeometry(); | ||||
112 | void resetHaveNextWindowGeometry(); | ||||
113 | QRect adjustMoveResizeGeometry(const QRect &rect) const; | ||||
114 | void updateGeometryRestoreHack(); | ||||
115 | void updateDepth(); | ||||
116 | void internalShow(); | ||||
117 | void internalHide(); | ||||
118 | void internalMap(); | ||||
119 | void internalUnmap(); | ||||
120 | void cleanGrouping(); | ||||
121 | void cleanTabBox(); | ||||
122 | | ||||
123 | KWaylandServer::XdgSurfaceInterface *m_shellSurface; | ||||
124 | QTimer *m_configureTimer; | ||||
125 | QQueue<XdgSurfaceConfigure *> m_configureEvents; | ||||
126 | XdgSurfaceConfigure *m_lastAcknowledgedConfigure = nullptr; | ||||
127 | QRect m_windowGeometry; | ||||
128 | QRect m_requestedFrameGeometry; | ||||
129 | QRect m_bufferGeometry; | ||||
130 | QRect m_requestedClientGeometry; | ||||
131 | QRect m_clientGeometry; | ||||
132 | bool m_isClosing = false; | ||||
133 | bool m_isHidden = false; | ||||
134 | bool m_isUnmapped = true; | ||||
135 | bool m_haveNextWindowGeometry = false; | ||||
136 | }; | ||||
137 | | ||||
138 | class XdgToplevelConfigure final : public XdgSurfaceConfigure | ||||
139 | { | ||||
140 | public: | ||||
141 | KWaylandServer::XdgToplevelInterface::States states; | ||||
142 | }; | ||||
143 | | ||||
144 | class XdgToplevelClient final : public XdgSurfaceClient | ||||
145 | { | ||||
146 | Q_OBJECT | ||||
147 | | ||||
148 | enum class PingReason { | ||||
149 | CloseWindow, | ||||
150 | FocusWindow, | ||||
151 | }; | ||||
152 | | ||||
153 | public: | ||||
154 | explicit XdgToplevelClient(KWaylandServer::XdgToplevelInterface *shellSurface); | ||||
155 | ~XdgToplevelClient() override; | ||||
156 | | ||||
157 | void debug(QDebug &stream) const override; | ||||
158 | NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; | ||||
159 | MaximizeMode maximizeMode() const override; | ||||
160 | MaximizeMode requestedMaximizeMode() const override; | ||||
63 | QSize minSize() const override; | 161 | QSize minSize() const override; | ||
64 | QSize maxSize() const override; | 162 | QSize maxSize() const override; | ||
65 | QRect transparentRect() const override; | 163 | bool isFullScreen() const override; | ||
66 | NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; | 164 | bool isMovableAcrossScreens() const override; | ||
67 | void debug(QDebug &stream) const override; | 165 | bool isMovable() const override; | ||
68 | double opacity() const override; | 166 | bool isResizable() const override; | ||
69 | void setOpacity(double opacity) override; | | |||
70 | QByteArray windowRole() const override; | | |||
71 | void blockActivityUpdates(bool b = true) override; | | |||
72 | QString captionNormal() const override; | | |||
73 | QString captionSuffix() const override; | | |||
74 | void closeWindow() override; | | |||
75 | AbstractClient *findModal(bool allow_itself = false) override; | | |||
76 | bool isCloseable() const override; | 167 | bool isCloseable() const override; | ||
77 | bool isFullScreenable() const override; | 168 | bool isFullScreenable() const override; | ||
78 | bool isFullScreen() const override; | | |||
79 | bool isMaximizable() const override; | 169 | bool isMaximizable() const override; | ||
80 | bool isMinimizable() const override; | 170 | bool isMinimizable() const override; | ||
81 | bool isMovable() const override; | 171 | bool isTransient() const override; | ||
82 | bool isMovableAcrossScreens() const override; | 172 | bool userCanSetFullScreen() const override; | ||
83 | bool isResizable() const override; | 173 | bool userCanSetNoBorder() const override; | ||
84 | bool isShown(bool shaded_is_shown) const override; | | |||
85 | bool isHiddenInternal() const override; | | |||
86 | void hideClient(bool hide) override; | | |||
87 | MaximizeMode maximizeMode() const override; | | |||
88 | MaximizeMode requestedMaximizeMode() const override; | | |||
89 | bool noBorder() const override; | 174 | bool noBorder() const override; | ||
90 | void setFullScreen(bool set, bool user = true) override; | | |||
91 | void setNoBorder(bool set) override; | 175 | void setNoBorder(bool set) override; | ||
92 | void updateDecoration(bool check_workspace_pos, bool force = false) override; | 176 | void updateDecoration(bool check_workspace_pos, bool force = false) override; | ||
93 | void setOnAllActivities(bool set) override; | 177 | void updateColorScheme() override; | ||
178 | bool supportsWindowRules() const override; | ||||
94 | void takeFocus() override; | 179 | void takeFocus() override; | ||
95 | bool userCanSetFullScreen() const override; | | |||
96 | bool userCanSetNoBorder() const override; | | |||
97 | bool wantsInput() const override; | 180 | bool wantsInput() const override; | ||
98 | bool dockWantsInput() const override; | 181 | bool dockWantsInput() const override; | ||
99 | void resizeWithChecks(const QSize &size, ForceGeometry_t force = NormalGeometrySet) override; | | |||
100 | void setFrameGeometry(const QRect &rect, ForceGeometry_t force = NormalGeometrySet) override; | | |||
101 | bool hasStrut() const override; | 182 | bool hasStrut() const override; | ||
102 | quint32 windowId() const override; | | |||
103 | pid_t pid() const override; | | |||
104 | bool isLockScreen() const override; | | |||
105 | bool isInputMethod() const override; | | |||
106 | bool isInitialPositionSet() const override; | | |||
107 | bool isTransient() const override; | | |||
108 | bool hasTransientPlacementHint() const override; | | |||
109 | QRect transientPlacement(const QRect &bounds) const override; | | |||
110 | QMatrix4x4 inputTransformation() const override; | | |||
111 | void showOnScreenEdge() override; | 183 | void showOnScreenEdge() override; | ||
112 | bool hasPopupGrab() const override; | 184 | bool isInitialPositionSet() const override; | ||
113 | void popupDone() override; | 185 | void setFullScreen(bool set, bool user) override; | ||
114 | void updateColorScheme() override; | 186 | void closeWindow() override; | ||
115 | bool isPopupWindow() const override; | | |||
116 | void killWindow() override; | | |||
117 | bool isLocalhost() const override; | | |||
118 | bool supportsWindowRules() const override; | | |||
119 | void destroyClient() override; | | |||
120 | 187 | | |||
121 | void installPlasmaShellSurface(KWaylandServer::PlasmaShellSurfaceInterface *surface); | 188 | void installAppMenu(KWaylandServer::AppMenuInterface *appMenu); | ||
122 | void installServerSideDecoration(KWaylandServer::ServerSideDecorationInterface *decoration); | 189 | void installServerDecoration(KWaylandServer::ServerSideDecorationInterface *decoration); | ||
123 | void installAppMenu(KWaylandServer::AppMenuInterface *appmenu); | | |||
124 | void installPalette(KWaylandServer::ServerSideDecorationPaletteInterface *palette); | 190 | void installPalette(KWaylandServer::ServerSideDecorationPaletteInterface *palette); | ||
125 | void installXdgDecoration(KWaylandServer::XdgDecorationInterface *decoration); | 191 | void installPlasmaShellSurface(KWaylandServer::PlasmaShellSurfaceInterface *shellSurface); | ||
192 | void installXdgDecoration(KWaylandServer::XdgToplevelDecorationV1Interface *decoration); | ||||
126 | 193 | | |||
127 | protected: | 194 | protected: | ||
128 | void addDamage(const QRegion &damage) override; | 195 | XdgSurfaceConfigure *sendRoleConfigure() const override; | ||
129 | bool belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const override; | 196 | void handleRoleCommit() override; | ||
130 | void doSetActive() override; | 197 | void doMinimize() override; | ||
131 | bool belongsToDesktop() const override; | | |||
132 | Layer layerForDock() const override; | | |||
133 | void changeMaximize(bool horizontal, bool vertical, bool adjust) override; | | |||
134 | void doResizeSync() override; | 198 | void doResizeSync() override; | ||
199 | void doSetActive() override; | ||||
135 | bool acceptsFocus() const override; | 200 | bool acceptsFocus() const override; | ||
136 | void doMinimize() override; | 201 | void changeMaximize(bool horizontal, bool vertical, bool adjust) override; | ||
137 | void updateCaption() override; | 202 | Layer layerForDock() const override; | ||
138 | void doMove(int x, int y) override; | | |||
139 | 203 | | |||
140 | private Q_SLOTS: | 204 | private: | ||
141 | void handleConfigureAcknowledged(quint32 serial); | 205 | void handleWindowTitleChanged(); | ||
142 | void handleTransientForChanged(); | 206 | void handleWindowClassChanged(); | ||
143 | void handleWindowClassChanged(const QByteArray &windowClass); | 207 | void handleWindowMenuRequested(KWaylandServer::SeatInterface *seat, | ||
144 | void handleWindowGeometryChanged(const QRect &windowGeometry); | 208 | const QPoint &surfacePos, quint32 serial); | ||
145 | void handleWindowTitleChanged(const QString &title); | | |||
146 | void handleMoveRequested(KWaylandServer::SeatInterface *seat, quint32 serial); | 209 | void handleMoveRequested(KWaylandServer::SeatInterface *seat, quint32 serial); | ||
147 | void handleResizeRequested(KWaylandServer::SeatInterface *seat, quint32 serial, Qt::Edges edges); | 210 | void handleResizeRequested(KWaylandServer::SeatInterface *seat, | ||
211 | Qt::Edges, quint32 serial); | ||||
212 | void handleStatesAcknowledged(const KWaylandServer::XdgToplevelInterface::States &states); | ||||
213 | void handleMaximizeRequested(); | ||||
214 | void handleUnmaximizeRequested(); | ||||
215 | void handleFullscreenRequested(KWaylandServer::OutputInterface *output); | ||||
216 | void handleUnfullscreenRequested(); | ||||
148 | void handleMinimizeRequested(); | 217 | void handleMinimizeRequested(); | ||
149 | void handleMaximizeRequested(bool maximized); | 218 | void handleTransientForChanged(); | ||
150 | void handleFullScreenRequested(bool fullScreen, KWaylandServer::OutputInterface *output); | 219 | void handleForeignTransientForChanged(KWaylandServer::SurfaceInterface *child); | ||
151 | void handleWindowMenuRequested(KWaylandServer::SeatInterface *seat, quint32 serial, const QPoint &surfacePos); | | |||
152 | void handleGrabRequested(KWaylandServer::SeatInterface *seat, quint32 serial); | | |||
153 | void handlePingDelayed(quint32 serial); | | |||
154 | void handlePingTimeout(quint32 serial); | 220 | void handlePingTimeout(quint32 serial); | ||
221 | void handlePingDelayed(quint32 serial); | ||||
155 | void handlePongReceived(quint32 serial); | 222 | void handlePongReceived(quint32 serial); | ||
156 | void handleCommitted(); | 223 | void initialize(); | ||
157 | | ||||
158 | private: | | |||
159 | /** | | |||
160 | * Called when the shell is created. | | |||
161 | */ | | |||
162 | void init(); | | |||
163 | /** | | |||
164 | * Called for the XDG case when the shell surface is committed to the surface. | | |||
165 | * At this point all initial properties should have been set by the client. | | |||
166 | */ | | |||
167 | void finishInit(); | | |||
168 | void createWindowId(); | | |||
169 | void updateIcon(); | | |||
170 | bool shouldExposeToWindowManagement(); | | |||
171 | void updateClientOutputs(); | | |||
172 | KWaylandServer::XdgShellSurfaceInterface::States xdgSurfaceStates() const; | | |||
173 | void updateShowOnScreenEdge(); | | |||
174 | void updateMaximizeMode(MaximizeMode maximizeMode); | 224 | void updateMaximizeMode(MaximizeMode maximizeMode); | ||
175 | // called on surface commit and processes all m_pendingConfigureRequests up to m_lastAckedConfigureReqest | 225 | void updateFullScreenMode(bool set); | ||
176 | void updatePendingGeometry(); | 226 | void updateShowOnScreenEdge(); | ||
177 | QPoint popupOffset(const QRect &anchorRect, const Qt::Edges anchorEdge, const Qt::Edges gravity, const QSize popupSize) const; | 227 | void setupWindowManagementIntegration(); | ||
178 | void requestGeometry(const QRect &rect); | 228 | void setupPlasmaShellIntegration(); | ||
179 | void doSetGeometry(const QRect &rect); | 229 | void sendPing(PingReason reason); | ||
180 | void unmap(); | | |||
181 | void markAsMapped(); | | |||
182 | QRect determineBufferGeometry() const; | | |||
183 | void ping(PingReason reason); | | |||
184 | static void deleteClient(XdgShellClient *c); | | |||
185 | | ||||
186 | QRect adjustMoveGeometry(const QRect &rect) const; | | |||
187 | QRect adjustResizeGeometry(const QRect &rect) const; | | |||
188 | | ||||
189 | KWaylandServer::XdgShellSurfaceInterface *m_xdgShellToplevel; | | |||
190 | KWaylandServer::XdgShellPopupInterface *m_xdgShellPopup; | | |||
191 | | ||||
192 | QRect m_bufferGeometry; | | |||
193 | QRect m_windowGeometry; | | |||
194 | bool m_hasWindowGeometry = false; | | |||
195 | | ||||
196 | // last size we requested or empty if we haven't sent an explicit request to the client | | |||
197 | // if empty the client should choose their own default size | | |||
198 | QSize m_requestedClientSize = QSize(0, 0); | | |||
199 | | ||||
200 | struct PendingConfigureRequest { | | |||
201 | //note for wl_shell we have no serial, so serialId and m_lastAckedConfigureRequest will always be 0 | | |||
202 | //meaning we treat a surface commit as having processed all requests | | |||
203 | quint32 serialId = 0; | | |||
204 | // position to apply after a resize operation has been completed | | |||
205 | QPoint positionAfterResize; | | |||
206 | MaximizeMode maximizeMode; | | |||
207 | }; | | |||
208 | QVector<PendingConfigureRequest> m_pendingConfigureRequests; | | |||
209 | quint32 m_lastAckedConfigureRequest = 0; | | |||
210 | | ||||
211 | //mode in use by the current buffer | | |||
212 | MaximizeMode m_maximizeMode = MaximizeRestore; | | |||
213 | //mode we currently want to be, could be pending on client updating, could be not sent yet | | |||
214 | MaximizeMode m_requestedMaximizeMode = MaximizeRestore; | | |||
215 | 230 | | |||
216 | QRect m_geomFsRestore; //size and position of the window before it was set to fullscreen | | |||
217 | bool m_closing = false; | | |||
218 | quint32 m_windowId = 0; | | |||
219 | bool m_unmapped = true; | | |||
220 | NET::WindowType m_windowType = NET::Normal; | | |||
221 | QPointer<KWaylandServer::PlasmaShellSurfaceInterface> m_plasmaShellSurface; | 231 | QPointer<KWaylandServer::PlasmaShellSurfaceInterface> m_plasmaShellSurface; | ||
222 | QPointer<KWaylandServer::AppMenuInterface> m_appMenuInterface; | 232 | QPointer<KWaylandServer::AppMenuInterface> m_appMenuInterface; | ||
223 | QPointer<KWaylandServer::ServerSideDecorationPaletteInterface> m_paletteInterface; | 233 | QPointer<KWaylandServer::ServerSideDecorationPaletteInterface> m_paletteInterface; | ||
224 | KWaylandServer::ServerSideDecorationInterface *m_serverDecoration = nullptr; | 234 | QPointer<KWaylandServer::ServerSideDecorationInterface> m_serverDecoration; | ||
225 | KWaylandServer::XdgDecorationInterface *m_xdgDecoration = nullptr; | 235 | QPointer<KWaylandServer::XdgToplevelDecorationV1Interface> m_xdgDecoration; | ||
236 | KWaylandServer::XdgToplevelInterface *m_shellSurface; | ||||
237 | KWaylandServer::XdgToplevelInterface::States m_lastAcknowledgedStates; | ||||
238 | QMap<quint32, PingReason> m_pings; | ||||
239 | QRect m_fullScreenGeometryRestore; | ||||
240 | NET::WindowType m_windowType = NET::Normal; | ||||
241 | MaximizeMode m_maximizeMode = MaximizeRestore; | ||||
242 | MaximizeMode m_requestedMaximizeMode = MaximizeRestore; | ||||
243 | bool m_isFullScreen = false; | ||||
226 | bool m_userNoBorder = false; | 244 | bool m_userNoBorder = false; | ||
227 | bool m_fullScreen = false; | 245 | bool m_isTransient = false; | ||
228 | bool m_transient = false; | 246 | bool m_isInitialized = false; | ||
229 | bool m_hidden = false; | 247 | }; | ||
230 | bool m_hasPopupGrab = false; | | |||
231 | qreal m_opacity = 1.0; | | |||
232 | 248 | | |||
233 | class RequestGeometryBlocker { //TODO rename ConfigureBlocker when this class is Xdg only | 249 | class XdgPopupClient final : public XdgSurfaceClient | ||
234 | public: | | |||
235 | RequestGeometryBlocker(XdgShellClient *client) | | |||
236 | : m_client(client) | | |||
237 | { | | |||
238 | m_client->m_requestGeometryBlockCounter++; | | |||
239 | } | | |||
240 | ~RequestGeometryBlocker() | | |||
241 | { | 250 | { | ||
242 | m_client->m_requestGeometryBlockCounter--; | 251 | Q_OBJECT | ||
243 | if (m_client->m_requestGeometryBlockCounter == 0) { | | |||
244 | m_client->requestGeometry(m_client->m_blockedRequestGeometry); | | |||
245 | } | | |||
246 | } | | |||
247 | private: | | |||
248 | XdgShellClient *m_client; | | |||
249 | }; | | |||
250 | friend class RequestGeometryBlocker; | | |||
251 | int m_requestGeometryBlockCounter = 0; | | |||
252 | QRect m_blockedRequestGeometry; | | |||
253 | QString m_caption; | | |||
254 | QString m_captionSuffix; | | |||
255 | QHash<quint32, PingReason> m_pingSerials; | | |||
256 | 252 | | |||
257 | bool m_isInitialized = false; | 253 | public: | ||
254 | explicit XdgPopupClient(KWaylandServer::XdgPopupInterface *shellSurface); | ||||
255 | ~XdgPopupClient() override; | ||||
256 | | ||||
257 | void debug(QDebug &stream) const override; | ||||
258 | NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; | ||||
259 | bool hasPopupGrab() const override; | ||||
260 | void popupDone() override; | ||||
261 | bool isPopupWindow() const override; | ||||
262 | bool isTransient() const override; | ||||
263 | bool isResizable() const override; | ||||
264 | bool isMovable() const override; | ||||
265 | bool isMovableAcrossScreens() const override; | ||||
266 | bool hasTransientPlacementHint() const override; | ||||
267 | QRect transientPlacement(const QRect &bounds) const override; | ||||
268 | bool isCloseable() const override; | ||||
269 | void closeWindow() override; | ||||
270 | void updateColorScheme() override; | ||||
271 | bool noBorder() const override; | ||||
272 | bool userCanSetNoBorder() const override; | ||||
273 | void setNoBorder(bool set) override; | ||||
274 | void updateDecoration(bool check_workspace_pos, bool force = false) override; | ||||
275 | void showOnScreenEdge() override; | ||||
276 | bool wantsInput() const override; | ||||
277 | void takeFocus() override; | ||||
278 | bool supportsWindowRules() const override; | ||||
279 | | ||||
280 | protected: | ||||
281 | bool acceptsFocus() const override; | ||||
282 | XdgSurfaceConfigure *sendRoleConfigure() const override; | ||||
258 | 283 | | |||
259 | friend class Workspace; | 284 | private: | ||
285 | void handleGrabRequested(KWaylandServer::SeatInterface *seat, quint32 serial); | ||||
286 | void initialize(); | ||||
287 | | ||||
288 | KWaylandServer::XdgPopupInterface *m_shellSurface; | ||||
289 | bool m_haveExplicitGrab = false; | ||||
260 | }; | 290 | }; | ||
261 | 291 | | |||
262 | } | 292 | } // namespace KWin | ||
263 | 293 | | |||
264 | Q_DECLARE_METATYPE(KWin::XdgShellClient *) | 294 | Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::XdgSurfaceConfigure::ConfigureFields) |