KWayland

display.cpp
1 /*
2  SPDX-FileCopyrightText: 2014 Martin Gräßlin <[email protected]>
3  SPDX-FileCopyrightText: 2018 David Edmundson <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 #include "display.h"
8 #include "appmenu_interface.h"
9 #include "blur_interface.h"
10 #include "compositor_interface.h"
11 #include "contrast_interface.h"
12 #include "datadevicemanager_interface.h"
13 #include "dpms_interface.h"
14 #include "eglstream_controller_interface.h"
15 #include "fakeinput_interface.h"
16 #include "idle_interface.h"
17 #include "idleinhibit_interface_p.h"
18 #include "keystate_interface.h"
19 #include "linuxdmabuf_v1_interface.h"
20 #include "logging.h"
21 #include "output_interface.h"
22 #include "outputconfiguration_interface.h"
23 #include "outputdevice_interface.h"
24 #include "outputmanagement_interface.h"
25 #include "plasmashell_interface.h"
26 #include "plasmavirtualdesktop_interface.h"
27 #include "plasmawindowmanagement_interface.h"
28 #include "pointerconstraints_interface_p.h"
29 #include "pointergestures_interface_p.h"
30 #include "qtsurfaceextension_interface.h"
31 #include "relativepointer_interface_p.h"
32 #include "remote_access_interface.h"
33 #include "seat_interface.h"
34 #include "server_decoration_interface.h"
35 #include "server_decoration_palette_interface.h"
36 #include "shadow_interface.h"
37 #include "shell_interface.h"
38 #include "slide_interface.h"
39 #include "subcompositor_interface.h"
40 #include "tablet_interface.h"
41 #include "textinput_interface_p.h"
42 #include "xdgdecoration_interface.h"
43 #include "xdgforeign_interface.h"
44 #include "xdgoutput_interface.h"
45 #include "xdgshell_stable_interface_p.h"
46 #include "xdgshell_v5_interface_p.h"
47 #include "xdgshell_v6_interface_p.h"
48 
49 #include <QAbstractEventDispatcher>
50 #include <QCoreApplication>
51 #include <QDebug>
52 #include <QSocketNotifier>
53 #include <QThread>
54 
55 #include <wayland-server.h>
56 
57 #include <EGL/egl.h>
58 
59 namespace KWayland
60 {
61 namespace Server
62 {
63 class Display::Private
64 {
65 public:
66  Private(Display *q);
67  void flush();
68  void dispatch();
69  void setRunning(bool running);
70  void installSocketNotifier();
71 
72  wl_display *display = nullptr;
73  wl_event_loop *loop = nullptr;
74  QString socketName = QStringLiteral("wayland-0");
75  bool running = false;
76  bool automaticSocketNaming = false;
78  QList<OutputDeviceInterface *> outputdevices;
81  EGLDisplay eglDisplay = EGL_NO_DISPLAY;
82 
83 private:
84  Display *q;
85 };
86 
87 Display::Private::Private(Display *q)
88  : q(q)
89 {
90 }
91 
92 void Display::Private::installSocketNotifier()
93 {
94  if (!QThread::currentThread()) {
95  return;
96  }
97  int fd = wl_event_loop_get_fd(loop);
98  if (fd == -1) {
99  qCWarning(KWAYLAND_SERVER) << "Did not get the file descriptor for the event loop";
100  return;
101  }
102  QSocketNotifier *m_notifier = new QSocketNotifier(fd, QSocketNotifier::Read, q);
103  QObject::connect(m_notifier, &QSocketNotifier::activated, q, [this] {
104  dispatch();
105  });
107  flush();
108  });
109  setRunning(true);
110 }
111 
112 Display::Display(QObject *parent)
113  : QObject(parent)
114  , d(new Private(this))
115 {
116 }
117 
118 Display::~Display()
119 {
120  terminate();
121  if (d->display) {
122  wl_display_destroy(d->display);
123  }
124 }
125 
126 void Display::Private::flush()
127 {
128  if (!display || !loop) {
129  return;
130  }
131  wl_display_flush_clients(display);
132 }
133 
134 void Display::Private::dispatch()
135 {
136  if (!display || !loop) {
137  return;
138  }
139  if (wl_event_loop_dispatch(loop, 0) != 0) {
140  qCWarning(KWAYLAND_SERVER) << "Error on dispatching Wayland event loop";
141  }
142 }
143 
145 {
146  if (d->socketName == name) {
147  return;
148  }
149  d->socketName = name;
150  Q_EMIT socketNameChanged(d->socketName);
151 }
152 
153 QString Display::socketName() const
154 {
155  return d->socketName;
156 }
157 
158 void Display::setAutomaticSocketNaming(bool automaticSocketNaming)
159 {
160  if (d->automaticSocketNaming == automaticSocketNaming) {
161  return;
162  }
163  d->automaticSocketNaming = automaticSocketNaming;
164  Q_EMIT automaticSocketNamingChanged(automaticSocketNaming);
165 }
166 
167 bool Display::automaticSocketNaming() const
168 {
169  return d->automaticSocketNaming;
170 }
171 
172 void Display::start(StartMode mode)
173 {
174  Q_ASSERT(!d->running);
175  Q_ASSERT(!d->display);
176  d->display = wl_display_create();
177  if (mode == StartMode::ConnectToSocket) {
178  if (d->automaticSocketNaming) {
179  const char *socket = wl_display_add_socket_auto(d->display);
180  if (socket == nullptr) {
181  qCWarning(KWAYLAND_SERVER) << "Failed to create Wayland socket";
182  return;
183  }
184 
185  const QString newEffectiveSocketName = QString::fromUtf8(socket);
186  if (d->socketName != newEffectiveSocketName) {
187  d->socketName = newEffectiveSocketName;
188  Q_EMIT socketNameChanged(d->socketName);
189  }
190  } else if (wl_display_add_socket(d->display, qPrintable(d->socketName)) != 0) {
191  qCWarning(KWAYLAND_SERVER) << "Failed to create Wayland socket";
192  return;
193  }
194  }
195 
196  d->loop = wl_display_get_event_loop(d->display);
197  d->installSocketNotifier();
198 }
199 
201 {
202  Q_ASSERT(!d->running);
203  Q_ASSERT(d->display);
204  d->installSocketNotifier();
205 }
206 
207 void Display::dispatchEvents(int msecTimeout)
208 {
209  Q_ASSERT(d->display);
210  if (d->running) {
211  d->dispatch();
212  } else if (d->loop) {
213  wl_event_loop_dispatch(d->loop, msecTimeout);
214  wl_display_flush_clients(d->display);
215  }
216 }
217 
218 void Display::terminate()
219 {
220  if (!d->running) {
221  return;
222  }
223  Q_EMIT aboutToTerminate();
224  wl_display_terminate(d->display);
225  wl_display_destroy(d->display);
226  d->display = nullptr;
227  d->loop = nullptr;
228  d->setRunning(false);
229 }
230 
231 void Display::Private::setRunning(bool r)
232 {
233  Q_ASSERT(running != r);
234  running = r;
235  Q_EMIT q->runningChanged(running);
236 }
237 
238 OutputInterface *Display::createOutput(QObject *parent)
239 {
240  OutputInterface *output = new OutputInterface(this, parent);
241  connect(output, &QObject::destroyed, this, [this, output] {
242  d->outputs.removeAll(output);
243  });
244  connect(this, &Display::aboutToTerminate, output, [this, output] {
245  removeOutput(output);
246  });
247  d->outputs << output;
248  return output;
249 }
250 
251 CompositorInterface *Display::createCompositor(QObject *parent)
252 {
253  CompositorInterface *compositor = new CompositorInterface(this, parent);
254  connect(this, &Display::aboutToTerminate, compositor, [compositor] {
255  delete compositor;
256  });
257  return compositor;
258 }
259 
260 ShellInterface *Display::createShell(QObject *parent)
261 {
262  ShellInterface *shell = new ShellInterface(this, parent);
263  connect(this, &Display::aboutToTerminate, shell, [shell] {
264  delete shell;
265  });
266  return shell;
267 }
268 
269 OutputDeviceInterface *Display::createOutputDevice(QObject *parent)
270 {
271  OutputDeviceInterface *output = new OutputDeviceInterface(this, parent);
272  connect(output, &QObject::destroyed, this, [this, output] {
273  d->outputdevices.removeAll(output);
274  });
275  connect(this, &Display::aboutToTerminate, output, [this, output] {
276  removeOutputDevice(output);
277  });
278  d->outputdevices << output;
279  return output;
280 }
281 
282 OutputManagementInterface *Display::createOutputManagement(QObject *parent)
283 {
284  OutputManagementInterface *om = new OutputManagementInterface(this, parent);
285  connect(this, &Display::aboutToTerminate, om, [om] {
286  delete om;
287  });
288  return om;
289 }
290 
291 SeatInterface *Display::createSeat(QObject *parent)
292 {
293  SeatInterface *seat = new SeatInterface(this, parent);
294  connect(seat, &QObject::destroyed, this, [this, seat] {
295  d->seats.removeAll(seat);
296  });
297  connect(this, &Display::aboutToTerminate, seat, [seat] {
298  delete seat;
299  });
300  d->seats << seat;
301  return seat;
302 }
303 
304 SubCompositorInterface *Display::createSubCompositor(QObject *parent)
305 {
306  auto c = new SubCompositorInterface(this, parent);
307  connect(this, &Display::aboutToTerminate, c, [c] {
308  delete c;
309  });
310  return c;
311 }
312 
313 DataDeviceManagerInterface *Display::createDataDeviceManager(QObject *parent)
314 {
315  auto m = new DataDeviceManagerInterface(this, parent);
316  connect(this, &Display::aboutToTerminate, m, [m] {
317  delete m;
318  });
319  return m;
320 }
321 
322 PlasmaShellInterface *Display::createPlasmaShell(QObject *parent)
323 {
324  auto s = new PlasmaShellInterface(this, parent);
325  connect(this, &Display::aboutToTerminate, s, [s] {
326  delete s;
327  });
328  return s;
329 }
330 
331 PlasmaWindowManagementInterface *Display::createPlasmaWindowManagement(QObject *parent)
332 {
333  auto wm = new PlasmaWindowManagementInterface(this, parent);
334  connect(this, &Display::aboutToTerminate, wm, [wm] {
335  delete wm;
336  });
337  return wm;
338 }
339 
340 QtSurfaceExtensionInterface *Display::createQtSurfaceExtension(QObject *parent)
341 {
342  auto s = new QtSurfaceExtensionInterface(this, parent);
343  connect(this, &Display::aboutToTerminate, s, [s] {
344  delete s;
345  });
346  return s;
347 }
348 
349 RemoteAccessManagerInterface *Display::createRemoteAccessManager(QObject *parent)
350 {
351  auto i = new RemoteAccessManagerInterface(this, parent);
352  connect(this, &Display::aboutToTerminate, i, [i] {
353  delete i;
354  });
355  return i;
356 }
357 
358 IdleInterface *Display::createIdle(QObject *parent)
359 {
360  auto i = new IdleInterface(this, parent);
361  connect(this, &Display::aboutToTerminate, i, [i] {
362  delete i;
363  });
364  return i;
365 }
366 
367 FakeInputInterface *Display::createFakeInput(QObject *parent)
368 {
369  auto i = new FakeInputInterface(this, parent);
370  connect(this, &Display::aboutToTerminate, i, [i] {
371  delete i;
372  });
373  return i;
374 }
375 
376 ShadowManagerInterface *Display::createShadowManager(QObject *parent)
377 {
378  auto s = new ShadowManagerInterface(this, parent);
379  connect(this, &Display::aboutToTerminate, s, [s] {
380  delete s;
381  });
382  return s;
383 }
384 
385 BlurManagerInterface *Display::createBlurManager(QObject *parent)
386 {
387  auto b = new BlurManagerInterface(this, parent);
388  connect(this, &Display::aboutToTerminate, b, [b] {
389  delete b;
390  });
391  return b;
392 }
393 
394 ContrastManagerInterface *Display::createContrastManager(QObject *parent)
395 {
396  auto b = new ContrastManagerInterface(this, parent);
397  connect(this, &Display::aboutToTerminate, b, [b] {
398  delete b;
399  });
400  return b;
401 }
402 
403 SlideManagerInterface *Display::createSlideManager(QObject *parent)
404 {
405  auto b = new SlideManagerInterface(this, parent);
406  connect(this, &Display::aboutToTerminate, b, [b] {
407  delete b;
408  });
409  return b;
410 }
411 
412 DpmsManagerInterface *Display::createDpmsManager(QObject *parent)
413 {
414  auto d = new DpmsManagerInterface(this, parent);
415  connect(this, &Display::aboutToTerminate, d, [d] {
416  delete d;
417  });
418  return d;
419 }
420 
422 {
423  auto d = new ServerSideDecorationManagerInterface(this, parent);
424  connect(this, &Display::aboutToTerminate, d, [d] {
425  delete d;
426  });
427  return d;
428 }
429 
431 {
432  TextInputManagerInterface *t = nullptr;
433  switch (version) {
435  t = new TextInputManagerUnstableV0Interface(this, parent);
436  break;
438  // unsupported
439  return nullptr;
441  t = new TextInputManagerUnstableV2Interface(this, parent);
442  }
443  connect(this, &Display::aboutToTerminate, t, [t] {
444  delete t;
445  });
446  return t;
447 }
448 
450 {
451  XdgShellInterface *x = nullptr;
452  switch (version) {
454  x = new XdgShellV5Interface(this, parent);
455  break;
457  x = new XdgShellV6Interface(this, parent);
458  break;
460  x = new XdgShellStableInterface(this, parent);
461  break;
462  }
463  connect(this, &Display::aboutToTerminate, x, [x] {
464  delete x;
465  });
466  return x;
467 }
468 
470 {
471  RelativePointerManagerInterface *r = nullptr;
472  switch (version) {
474  r = new RelativePointerManagerUnstableV1Interface(this, parent);
475  break;
476  }
477  connect(this, &Display::aboutToTerminate, r, [r] {
478  delete r;
479  });
480  return r;
481 }
482 
484 {
485  PointerGesturesInterface *p = nullptr;
486  switch (version) {
488  p = new PointerGesturesUnstableV1Interface(this, parent);
489  break;
490  }
491  connect(this, &Display::aboutToTerminate, p, [p] {
492  delete p;
493  });
494  return p;
495 }
496 
498 {
499  PointerConstraintsInterface *p = nullptr;
500  switch (version) {
502  p = new PointerConstraintsUnstableV1Interface(this, parent);
503  break;
504  }
505  connect(this, &Display::aboutToTerminate, p, [p] {
506  delete p;
507  });
508  return p;
509 }
510 
512 {
513  XdgForeignInterface *foreign = new XdgForeignInterface(this, parent);
514  connect(this, &Display::aboutToTerminate, foreign, [foreign] {
515  delete foreign;
516  });
517  return foreign;
518 }
519 
521 {
522  IdleInhibitManagerInterface *i = nullptr;
523  switch (version) {
525  i = new IdleInhibitManagerUnstableV1Interface(this, parent);
526  break;
527  }
528  connect(this, &Display::aboutToTerminate, i, [i] {
529  delete i;
530  });
531  return i;
532 }
533 
535 {
536  auto b = new AppMenuManagerInterface(this, parent);
537  connect(this, &Display::aboutToTerminate, b, [b] {
538  delete b;
539  });
540  return b;
541 }
542 
544 {
545  auto b = new ServerSideDecorationPaletteManagerInterface(this, parent);
546  connect(this, &Display::aboutToTerminate, b, [b] {
547  delete b;
548  });
549  return b;
550 }
551 
553 {
554  auto b = new LinuxDmabufUnstableV1Interface(this, parent);
555  connect(this, &Display::aboutToTerminate, b, [b] {
556  delete b;
557  });
558  return b;
559 }
560 
562 {
563  auto b = new PlasmaVirtualDesktopManagementInterface(this, parent);
564  connect(this, &Display::aboutToTerminate, b, [b] {
565  delete b;
566  });
567  return b;
568 }
569 
571 {
572  auto b = new XdgOutputManagerInterface(this, parent);
573  connect(this, &Display::aboutToTerminate, b, [b] {
574  delete b;
575  });
576  return b;
577 }
578 
580 {
581  auto d = new XdgDecorationManagerInterface(this, shellInterface, parent);
582  connect(this, &Display::aboutToTerminate, d, [d] {
583  delete d;
584  });
585  return d;
586 }
587 
589 {
591  connect(this, &Display::aboutToTerminate, e, [e] {
592  delete e;
593  });
594  return e;
595 }
596 
597 KeyStateInterface *Display::createKeyStateInterface(QObject *parent)
598 {
599  auto d = new KeyStateInterface(this, parent);
600  connect(this, &Display::aboutToTerminate, d, [d] {
601  delete d;
602  });
603  return d;
604 }
605 
606 TabletManagerInterface *Display::createTabletManagerInterface(QObject *parent)
607 {
608  auto d = new TabletManagerInterface(this, parent);
609  connect(this, &Display::aboutToTerminate, d, [d] {
610  delete d;
611  });
612  return d;
613 }
614 
615 void Display::createShm()
616 {
617  Q_ASSERT(d->display);
618  wl_display_init_shm(d->display);
619 }
620 
621 void Display::removeOutput(OutputInterface *output)
622 {
623  d->outputs.removeAll(output);
624  delete output;
625 }
626 
627 void Display::removeOutputDevice(OutputDeviceInterface *output)
628 {
629  d->outputdevices.removeAll(output);
630  delete output;
631 }
632 
633 quint32 Display::nextSerial()
634 {
635  return wl_display_next_serial(d->display);
636 }
637 
638 quint32 Display::serial()
639 {
640  return wl_display_get_serial(d->display);
641 }
642 
643 bool Display::isRunning() const
644 {
645  return d->running;
646 }
647 
648 Display::operator wl_display *()
649 {
650  return d->display;
651 }
652 
653 Display::operator wl_display *() const
654 {
655  return d->display;
656 }
657 
658 QList<OutputInterface *> Display::outputs() const
659 {
660  return d->outputs;
661 }
662 
663 QList<OutputDeviceInterface *> Display::outputDevices() const
664 {
665  return d->outputdevices;
666 }
667 
669 {
670  return d->seats;
671 }
672 
674 {
675  Q_ASSERT(client);
676  auto it = std::find_if(d->clients.constBegin(), d->clients.constEnd(), [client](ClientConnection *c) {
677  return c->client() == client;
678  });
679  if (it != d->clients.constEnd()) {
680  return *it;
681  }
682  // no ConnectionData yet, create it
683  auto c = new ClientConnection(client, this);
684  d->clients << c;
686  const int index = d->clients.indexOf(c);
687  Q_ASSERT(index != -1);
688  d->clients.remove(index);
689  Q_ASSERT(d->clients.indexOf(c) == -1);
690  Q_EMIT clientDisconnected(c);
691  });
692  Q_EMIT clientConnected(c);
693  return c;
694 }
695 
696 QVector<ClientConnection *> Display::connections() const
697 {
698  return d->clients;
699 }
700 
702 {
703  Q_ASSERT(fd != -1);
704  Q_ASSERT(d->display);
705  wl_client *c = wl_client_create(d->display, fd);
706  if (!c) {
707  return nullptr;
708  }
709  return getConnection(c);
710 }
711 
712 void Display::setEglDisplay(void *display)
713 {
714  if (d->eglDisplay != EGL_NO_DISPLAY) {
715  qCWarning(KWAYLAND_SERVER) << "EGLDisplay cannot be changed";
716  return;
717  }
718  d->eglDisplay = (EGLDisplay)display;
719 }
720 
721 void *Display::eglDisplay() const
722 {
723  return d->eglDisplay;
724 }
725 
726 }
727 }
EglStreamControllerInterface * createEglStreamControllerInterface(QObject *parent=nullptr)
Creates the EglStreamControllerInterface.
Definition: display.cpp:588
void activated(QSocketDescriptor socket, QSocketNotifier::Type type)
StartMode
How to setup the server connection.
Definition: display.h:120
XdgOutputManagerInterface * createXdgOutputManager(QObject *parent=nullptr)
Creates the XdgOutputManagerInterface.
Definition: display.cpp:570
LinuxDmabufUnstableV1Interface * createLinuxDmabufInterface(QObject *parent=nullptr)
Creates the LinuxDmabufUnstableV1Interface in interface version.
Definition: display.cpp:552
Global for the org_kde_plasma_shell interface.
ClientConnection * getConnection(wl_client *client)
Gets the ClientConnection for the given client.
Definition: display.cpp:673
PointerConstraintsInterfaceVersion
Enum describing the interface versions the PointerConstraintsInterface can support.
TabletManagerInterface * createTabletManagerInterface(QObject *parent=nullptr)
Creates the entry point to support wacom-like tablets and pens.
Definition: display.cpp:606
PointerConstraintsInterface * createPointerConstraints(const PointerConstraintsInterfaceVersion &version, QObject *parent=nullptr)
Creates the PointerConstraintsInterface in interface version.
Definition: display.cpp:497
ClientConnection * createClient(int fd)
Create a client for the given file descriptor.
Definition: display.cpp:701
Represents the global zpw_linux_dmabuf_v1 interface.
XdgShellInterface * createXdgShell(const XdgShellInterfaceVersion &version, QObject *parent=nullptr)
Creates the XdgShell in interface version.
Definition: display.cpp:449
Global for server side Display Power Management Signaling interface.
void setSocketName(const QString &name)
Sets the basename of the socket to name.
Definition: display.cpp:144
The IdleInhibitorManagerInterface is used by clients to inhibit idle on a SurfaceInterface.
Manager to create ServerSideDecorationInterface.
Represents the Global for wl_data_device_manager interface.
IdleInhibitManagerInterface * createIdleInhibitManager(const IdleInhibitManagerInterfaceVersion &version, QObject *parent=nullptr)
Creates the IdleInhibitManagerInterface in interface version.
Definition: display.cpp:520
PointerGesturesInterfaceVersion
Enum describing the interface versions the PointerGesturesInterface can support.
void startLoop()
Starts the event loop for the server socket.
Definition: display.cpp:200
RelativePointerManagerInterface * createRelativePointerManager(const RelativePointerInterfaceVersion &version, QObject *parent=nullptr)
Creates the RelativePointerManagerInterface in interface version.
Definition: display.cpp:469
Represents the Global for the wl_eglstream_controller interface.
Global for the wl_output interface.
TextInputInterfaceVersion
Enum describing the different InterfaceVersion encapsulated in this implementation.
PlasmaVirtualDesktopManagementInterface * createPlasmaVirtualDesktopManagement(QObject *parent=nullptr)
Creates the PlasmaVirtualDesktopManagementInterface in interface version.
Definition: display.cpp:561
Represents a Seat on the Wayland Display.
ServerSideDecorationManagerInterface * createServerSideDecorationManager(QObject *parent=nullptr)
Definition: display.cpp:421
QString fromUtf8(const char *str, int size)
AppMenuManagerInterface * createAppMenuManagerInterface(QObject *parent=nullptr)
Creates the AppMenuManagerInterface in interface version.
Definition: display.cpp:534
ServerSideDecorationPaletteManagerInterface * createServerSideDecorationPaletteManager(QObject *parent=nullptr)
Creates the ServerSideDecorationPaletteManagerInterface in interface version.
Definition: display.cpp:543
wl_text_input as the non-standardized version
The XdgDecorationManagerInterface class.
XdgShellInterfaceVersion
Enum describing the different InterfaceVersion encapsulated in this implementation.
Represents the Global for org_kde_kwin_contrast_manager interface.
Represents the Global for org_kde_kwin_blur_manager interface.
KeyStateInterface * createKeyStateInterface(QObject *parent=nullptr)
Definition: display.cpp:597
void disconnected(KWayland::Server::ClientConnection *)
Signal emitted when the ClientConnection got disconnected from the server.
XdgDecorationManagerInterface * createXdgDecorationManager(XdgShellInterface *shellInterface, QObject *parent=nullptr)
Creates the XdgDecorationManagerInterface.
Definition: display.cpp:579
Represents the Global for wl_compositor interface.
Manager object to create relative pointer interfaces.
QVector< SeatInterface * > seats() const
Definition: display.cpp:668
void * eglDisplay() const
Definition: display.cpp:721
Represent the Global for the interface.
void setAutomaticSocketNaming(bool automaticSocketNaming)
If automaticSocketNaming is true, the manually set socketName is ignored and it will use wl_display_a...
Definition: display.cpp:158
Wrapper for the org_kde_plasma_virtual_desktop_management interface.
PointerGesturesInterface * createPointerGestures(const PointerGesturesInterfaceVersion &version, QObject *parent=nullptr)
Creates the PointerGesturesInterface in interface version.
Definition: display.cpp:483
Represents an output device, the difference to Output is that this output can be disabled, so not currently used to display content.
Global representing the org_kde_kwin_idle interface.
QThread * currentThread()
This class encapsulates the server side logic of the XdgForeign protocol.
void dispatchEvents(int msecTimeout=-1)
Dispatches pending events in a blocking way.
Definition: display.cpp:207
Global for the wl_shell interface.
Convenient Class which represents a wl_client.
Manager object for the PointerGestures.
Provides the DBus service name and object path to a AppMenu DBus interface.
Allows a client to specify a preferred palette to use for server-side window decorations.
QTextStream & flush(QTextStream &stream)
ClientConnection * client()
Definition: resource.cpp:76
IdleInhibitManagerInterfaceVersion
Enum describing the interface versions the IdleInhibitManagerInterface can support.
void setEglDisplay(void *display)
Set the EGL display for this Wayland display.
Definition: display.cpp:712
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const const
Manager object to create pointer constraints.
XdgForeignInterface * createXdgForeignInterface(QObject *parent=nullptr)
Creates the XdgForeignInterface in interface version.
Definition: display.cpp:511
Represents the Global for org_kde_kwin_fake_input interface.
void destroyed(QObject *obj)
Q_EMITQ_EMIT
TextInputManagerInterface * createTextInputManager(const TextInputInterfaceVersion &version, QObject *parent=nullptr)
Create the text input manager in interface version.
Definition: display.cpp:430
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Sep 23 2021 22:51:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.