12#include <config-kwin.h>
36class PointerSwipeGesture;
37class PointerPinchGesture;
55class WaylandEglBackend;
69 QString
sysName()
const override;
70 QString
name()
const override;
75 LEDs
leds()
const override;
92 std::unique_ptr<KWayland::Client::Keyboard> m_keyboard;
93 std::unique_ptr<KWayland::Client::Touch> m_touch;
94 std::unique_ptr<KWayland::Client::RelativePointer> m_relativePointer;
95 std::unique_ptr<KWayland::Client::Pointer> m_pointer;
96 std::unique_ptr<KWayland::Client::PointerPinchGesture> m_pinchGesture;
97 std::unique_ptr<KWayland::Client::PointerSwipeGesture> m_swipeGesture;
99 QSet<quint32> m_pressedKeys;
129 return m_pointerDevice.get();
133 return m_relativePointerDevice.get();
137 return m_keyboardDevice.get();
141 return m_touchDevice.get();
152 void createPointerDevice();
153 void destroyPointerDevice();
154 void createKeyboardDevice();
155 void destroyKeyboardDevice();
156 void createTouchDevice();
157 void destroyTouchDevice();
159 KWayland::Client::Seat *m_seat;
162 std::unique_ptr<WaylandInputDevice> m_pointerDevice;
163 std::unique_ptr<WaylandInputDevice> m_relativePointerDevice;
164 std::unique_ptr<WaylandInputDevice> m_keyboardDevice;
165 std::unique_ptr<WaylandInputDevice> m_touchDevice;
176 wl_buffer *
handle()
const;
187 bool m_locked =
false;
211 bool initialize()
override;
213 std::unique_ptr<InputBackend> createInputBackend()
override;
214 std::unique_ptr<OpenGLBackend> createOpenGLBackend()
override;
215 std::unique_ptr<QPainterBackend> createQPainterBackend()
override;
219 return m_display.get();
226 bool supportsPointerLock();
227 void togglePointerLock();
229 QList<CompositingType> supportedCompositors()
const override;
231 WaylandOutput *findOutput(KWayland::Client::Surface *nativeSurface)
const;
232 Outputs outputs()
const override;
238 Output *createVirtualOutput(
const QString &name,
const QSize &size,
double scale)
override;
239 void removeVirtualOutput(
Output *output)
override;
250 m_eglBackend = eglBackend;
252 void setEglDisplay(std::unique_ptr<EglDisplay> &&display);
253 EglDisplay *sceneEglDisplayObject()
const override;
259 void createOutputs();
260 void destroyOutputs();
261 WaylandOutput *createOutput(
const QString &name,
const QSize &size, qreal scale);
264 std::unique_ptr<WaylandDisplay> m_display;
265 std::unique_ptr<WaylandSeat> m_seat;
267 QList<WaylandOutput *> m_outputs;
268 bool m_pointerLockRequested =
false;
270 gbm_device *m_gbmDevice =
nullptr;
271 std::unique_ptr<EglDisplay> m_eglDisplay;
272 std::map<GraphicsBuffer *, std::unique_ptr<WaylandBuffer>> m_buffers;
The Client class encapsulates a window decoration frame.
Class encapsulating all Wayland data structures needed by the Egl backend.
void setEglBackend(WaylandEglBackend *eglBackend)
WaylandDisplay * display() const
QList< WaylandOutput * > waylandOutputs() const
void pointerLockChanged(bool locked)
gbm_device * gbmDevice() const
WaylandSeat * seat() const
WaylandBuffer(wl_buffer *handle, GraphicsBuffer *graphicsBuffer)
wl_buffer * handle() const
~WaylandBuffer() override
OpenGL Backend using Egl on a Wayland surface.
WaylandInputDevice * pointerDevice() const
WaylandInputDevice * keyboardDevice() const
void deviceRemoved(WaylandInputDevice *device)
void createRelativePointer()
void destroyRelativePointer()
WaylandInputDevice * touchDevice() const
WaylandSeat(KWayland::Client::Seat *nativeSeat, WaylandBackend *backend)
void deviceAdded(WaylandInputDevice *device)
WaylandBackend * backend() const
WaylandInputDevice * relativePointerDevice() const