Changeset View
Changeset View
Standalone View
Standalone View
wayland_server.h
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
57 | class SurfaceInterface; | 57 | class SurfaceInterface; | ||
58 | class OutputInterface; | 58 | class OutputInterface; | ||
59 | class PlasmaShellInterface; | 59 | class PlasmaShellInterface; | ||
60 | class PlasmaShellSurfaceInterface; | 60 | class PlasmaShellSurfaceInterface; | ||
61 | class PlasmaVirtualDesktopManagementInterface; | 61 | class PlasmaVirtualDesktopManagementInterface; | ||
62 | class PlasmaWindowManagementInterface; | 62 | class PlasmaWindowManagementInterface; | ||
63 | class OutputManagementInterface; | 63 | class OutputManagementInterface; | ||
64 | class OutputConfigurationInterface; | 64 | class OutputConfigurationInterface; | ||
65 | class XdgDecorationManagerInterface; | | |||
66 | class XdgShellInterface; | | |||
67 | class XdgForeignInterface; | 65 | class XdgForeignInterface; | ||
68 | class XdgOutputManagerInterface; | 66 | class XdgOutputManagerInterface; | ||
69 | class KeyStateInterface; | 67 | class KeyStateInterface; | ||
70 | class LinuxDmabufUnstableV1Interface; | 68 | class LinuxDmabufUnstableV1Interface; | ||
71 | class LinuxDmabufUnstableV1Buffer; | 69 | class LinuxDmabufUnstableV1Buffer; | ||
72 | class TabletManagerInterface; | 70 | class TabletManagerInterface; | ||
71 | class XdgDecorationManagerV1Interface; | ||||
72 | class XdgShellInterface; | ||||
73 | class XdgToplevelInterface; | ||||
74 | class XdgPopupInterface; | ||||
73 | } | 75 | } | ||
74 | 76 | | |||
75 | 77 | | |||
76 | namespace KWin | 78 | namespace KWin | ||
77 | { | 79 | { | ||
78 | class XdgShellClient; | | |||
79 | 80 | | |||
80 | class AbstractClient; | 81 | class AbstractClient; | ||
81 | class Toplevel; | 82 | class Toplevel; | ||
83 | class XdgToplevelClient; | ||||
82 | 84 | | |||
83 | class KWIN_EXPORT WaylandServer : public QObject | 85 | class KWIN_EXPORT WaylandServer : public QObject | ||
84 | { | 86 | { | ||
85 | Q_OBJECT | 87 | Q_OBJECT | ||
86 | public: | 88 | public: | ||
87 | enum class InitializationFlag { | 89 | enum class InitializationFlag { | ||
88 | NoOptions = 0x0, | 90 | NoOptions = 0x0, | ||
89 | LockScreen = 0x1, | 91 | LockScreen = 0x1, | ||
Show All 38 Lines | |||||
128 | KWaylandServer::LinuxDmabufUnstableV1Interface *linuxDmabuf(); | 130 | KWaylandServer::LinuxDmabufUnstableV1Interface *linuxDmabuf(); | ||
129 | 131 | | |||
130 | QList<AbstractClient *> clients() const { | 132 | QList<AbstractClient *> clients() const { | ||
131 | return m_clients; | 133 | return m_clients; | ||
132 | } | 134 | } | ||
133 | void removeClient(AbstractClient *c); | 135 | void removeClient(AbstractClient *c); | ||
134 | AbstractClient *findClient(quint32 id) const; | 136 | AbstractClient *findClient(quint32 id) const; | ||
135 | AbstractClient *findClient(KWaylandServer::SurfaceInterface *surface) const; | 137 | AbstractClient *findClient(KWaylandServer::SurfaceInterface *surface) const; | ||
136 | XdgShellClient *findXdgShellClient(KWaylandServer::SurfaceInterface *surface) const; | 138 | XdgToplevelClient *findXdgToplevelClient(KWaylandServer::SurfaceInterface *surface) const; | ||
137 | 139 | | |||
138 | /** | 140 | /** | ||
139 | * @returns a transient parent of a surface imported with the foreign protocol, if any | 141 | * @returns a transient parent of a surface imported with the foreign protocol, if any | ||
140 | */ | 142 | */ | ||
141 | KWaylandServer::SurfaceInterface *findForeignTransientForSurface(KWaylandServer::SurfaceInterface *surface); | 143 | KWaylandServer::SurfaceInterface *findForeignTransientForSurface(KWaylandServer::SurfaceInterface *surface); | ||
142 | 144 | | |||
143 | /** | 145 | /** | ||
144 | * @returns file descriptor for Xwayland to connect to. | 146 | * @returns file descriptor for Xwayland to connect to. | ||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Line(s) | 239 | Q_SIGNALS: | |||
241 | void initialized(); | 243 | void initialized(); | ||
242 | void foreignTransientChanged(KWaylandServer::SurfaceInterface *child); | 244 | void foreignTransientChanged(KWaylandServer::SurfaceInterface *child); | ||
243 | 245 | | |||
244 | private: | 246 | private: | ||
245 | int createScreenLockerConnection(); | 247 | int createScreenLockerConnection(); | ||
246 | void shellClientShown(Toplevel *t); | 248 | void shellClientShown(Toplevel *t); | ||
247 | quint16 createClientId(KWaylandServer::ClientConnection *c); | 249 | quint16 createClientId(KWaylandServer::ClientConnection *c); | ||
248 | void destroyInternalConnection(); | 250 | void destroyInternalConnection(); | ||
249 | template <class T> | | |||
250 | void createSurface(T *surface); | | |||
251 | void initScreenLocker(); | 251 | void initScreenLocker(); | ||
252 | void createXdgToplevelClient(KWaylandServer::XdgToplevelInterface *shellSurface); | ||||
253 | void createXdgPopupClient(KWaylandServer::XdgPopupInterface *shellSurface); | ||||
254 | void registerClient(AbstractClient *client); | ||||
252 | KWaylandServer::Display *m_display = nullptr; | 255 | KWaylandServer::Display *m_display = nullptr; | ||
253 | KWaylandServer::CompositorInterface *m_compositor = nullptr; | 256 | KWaylandServer::CompositorInterface *m_compositor = nullptr; | ||
254 | KWaylandServer::SeatInterface *m_seat = nullptr; | 257 | KWaylandServer::SeatInterface *m_seat = nullptr; | ||
255 | KWaylandServer::TabletManagerInterface *m_tabletManager = nullptr; | 258 | KWaylandServer::TabletManagerInterface *m_tabletManager = nullptr; | ||
256 | KWaylandServer::DataDeviceManagerInterface *m_dataDeviceManager = nullptr; | 259 | KWaylandServer::DataDeviceManagerInterface *m_dataDeviceManager = nullptr; | ||
257 | KWaylandServer::XdgShellInterface *m_xdgShell = nullptr; | 260 | KWaylandServer::XdgShellInterface *m_xdgShell = nullptr; | ||
258 | KWaylandServer::PlasmaShellInterface *m_plasmaShell = nullptr; | 261 | KWaylandServer::PlasmaShellInterface *m_plasmaShell = nullptr; | ||
259 | KWaylandServer::PlasmaWindowManagementInterface *m_windowManagement = nullptr; | 262 | KWaylandServer::PlasmaWindowManagementInterface *m_windowManagement = nullptr; | ||
260 | KWaylandServer::PlasmaVirtualDesktopManagementInterface *m_virtualDesktopManagement = nullptr; | 263 | KWaylandServer::PlasmaVirtualDesktopManagementInterface *m_virtualDesktopManagement = nullptr; | ||
261 | KWaylandServer::ServerSideDecorationManagerInterface *m_decorationManager = nullptr; | 264 | KWaylandServer::ServerSideDecorationManagerInterface *m_decorationManager = nullptr; | ||
262 | KWaylandServer::OutputManagementInterface *m_outputManagement = nullptr; | 265 | KWaylandServer::OutputManagementInterface *m_outputManagement = nullptr; | ||
263 | KWaylandServer::AppMenuManagerInterface *m_appMenuManager = nullptr; | 266 | KWaylandServer::AppMenuManagerInterface *m_appMenuManager = nullptr; | ||
264 | KWaylandServer::ServerSideDecorationPaletteManagerInterface *m_paletteManager = nullptr; | 267 | KWaylandServer::ServerSideDecorationPaletteManagerInterface *m_paletteManager = nullptr; | ||
265 | KWaylandServer::IdleInterface *m_idle = nullptr; | 268 | KWaylandServer::IdleInterface *m_idle = nullptr; | ||
266 | KWaylandServer::XdgOutputManagerInterface *m_xdgOutputManager = nullptr; | 269 | KWaylandServer::XdgOutputManagerInterface *m_xdgOutputManager = nullptr; | ||
267 | KWaylandServer::XdgDecorationManagerInterface *m_xdgDecorationManager = nullptr; | 270 | KWaylandServer::XdgDecorationManagerV1Interface *m_xdgDecorationManagerV1 = nullptr; | ||
268 | KWaylandServer::LinuxDmabufUnstableV1Interface *m_linuxDmabuf = nullptr; | 271 | KWaylandServer::LinuxDmabufUnstableV1Interface *m_linuxDmabuf = nullptr; | ||
269 | QSet<KWaylandServer::LinuxDmabufUnstableV1Buffer*> m_linuxDmabufBuffers; | 272 | QSet<KWaylandServer::LinuxDmabufUnstableV1Buffer*> m_linuxDmabufBuffers; | ||
270 | struct { | 273 | struct { | ||
271 | KWaylandServer::ClientConnection *client = nullptr; | 274 | KWaylandServer::ClientConnection *client = nullptr; | ||
272 | QMetaObject::Connection destroyConnection; | 275 | QMetaObject::Connection destroyConnection; | ||
273 | } m_xwayland; | 276 | } m_xwayland; | ||
274 | KWaylandServer::ClientConnection *m_inputMethodServerConnection = nullptr; | 277 | KWaylandServer::ClientConnection *m_inputMethodServerConnection = nullptr; | ||
275 | KWaylandServer::ClientConnection *m_screenLockerClientConnection = nullptr; | 278 | KWaylandServer::ClientConnection *m_screenLockerClientConnection = nullptr; | ||
Show All 30 Lines |