Changeset View
Changeset View
Standalone View
Standalone View
xdgshellclient.h
Show All 19 Lines | |||||
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 "abstract_client.h" | ||
26 | 26 | | |||
27 | #include <KWayland/Server/xdgshell_interface.h> | 27 | #include <KWayland/Server/xdgshell_interface.h> | ||
28 | #include <KWayland/Server/inputmethod_interface.h> | ||||
28 | 29 | | |||
29 | namespace KWayland | 30 | namespace KWayland | ||
30 | { | 31 | { | ||
31 | namespace Server | 32 | namespace Server | ||
32 | { | 33 | { | ||
33 | class ServerSideDecorationInterface; | 34 | class ServerSideDecorationInterface; | ||
34 | class ServerSideDecorationPaletteInterface; | 35 | class ServerSideDecorationPaletteInterface; | ||
35 | class AppMenuInterface; | 36 | class AppMenuInterface; | ||
Show All 13 Lines | 48 | enum class PingReason { | |||
49 | FocusWindow | 50 | FocusWindow | ||
50 | }; | 51 | }; | ||
51 | 52 | | |||
52 | class KWIN_EXPORT XdgShellClient : public AbstractClient | 53 | class KWIN_EXPORT XdgShellClient : public AbstractClient | ||
53 | { | 54 | { | ||
54 | Q_OBJECT | 55 | Q_OBJECT | ||
55 | 56 | | |||
56 | public: | 57 | public: | ||
58 | XdgShellClient(KWayland::Server::InputPanelSurfaceInterface *surface); | ||||
57 | XdgShellClient(KWayland::Server::XdgShellSurfaceInterface *surface); | 59 | XdgShellClient(KWayland::Server::XdgShellSurfaceInterface *surface); | ||
58 | XdgShellClient(KWayland::Server::XdgShellPopupInterface *surface); | 60 | XdgShellClient(KWayland::Server::XdgShellPopupInterface *surface); | ||
59 | ~XdgShellClient() override; | 61 | ~XdgShellClient() override; | ||
60 | 62 | | |||
61 | QRect inputGeometry() const override; | 63 | QRect inputGeometry() const override; | ||
62 | QRect bufferGeometry() const override; | 64 | QRect bufferGeometry() const override; | ||
63 | QStringList activities() const override; | 65 | QStringList activities() const override; | ||
64 | QPoint clientContentPos() const override; | 66 | QPoint clientContentPos() const override; | ||
▲ Show 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | 166 | private: | |||
191 | void ping(PingReason reason); | 193 | void ping(PingReason reason); | ||
192 | static void deleteClient(XdgShellClient *c); | 194 | static void deleteClient(XdgShellClient *c); | ||
193 | 195 | | |||
194 | QRect adjustMoveGeometry(const QRect &rect) const; | 196 | QRect adjustMoveGeometry(const QRect &rect) const; | ||
195 | QRect adjustResizeGeometry(const QRect &rect) const; | 197 | QRect adjustResizeGeometry(const QRect &rect) const; | ||
196 | 198 | | |||
197 | KWayland::Server::XdgShellSurfaceInterface *m_xdgShellToplevel; | 199 | KWayland::Server::XdgShellSurfaceInterface *m_xdgShellToplevel; | ||
198 | KWayland::Server::XdgShellPopupInterface *m_xdgShellPopup; | 200 | KWayland::Server::XdgShellPopupInterface *m_xdgShellPopup; | ||
201 | KWayland::Server::InputPanelSurfaceInterface *m_inputPanelSurface = nullptr; | ||||
199 | 202 | | |||
200 | QRect m_bufferGeometry; | 203 | QRect m_bufferGeometry; | ||
201 | QRect m_windowGeometry; | 204 | QRect m_windowGeometry; | ||
202 | bool m_hasWindowGeometry = false; | 205 | bool m_hasWindowGeometry = false; | ||
203 | 206 | | |||
204 | // last size we requested or empty if we haven't sent an explicit request to the client | 207 | // last size we requested or empty if we haven't sent an explicit request to the client | ||
205 | // if empty the client should choose their own default size | 208 | // if empty the client should choose their own default size | ||
206 | QSize m_requestedClientSize = QSize(0, 0); | 209 | QSize m_requestedClientSize = QSize(0, 0); | ||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |