diff --git a/src/backends/wayland/wayland_backend.cpp b/src/backends/wayland/wayland_backend.cpp index c6dfca7e66..5c0f124422 100644 --- a/src/backends/wayland/wayland_backend.cpp +++ b/src/backends/wayland/wayland_backend.cpp @@ -138,7 +138,7 @@ WaylandInputDevice::WaylandInputDevice(KWayland::Client::Pointer *pointer, Wayla , m_pointer(pointer) { connect(pointer, &Pointer::entered, this, [this](quint32 serial, const QPointF &relativeToSurface) { - m_enteredSerial = serial; + m_seat->backend()->cursor()->install(); }); connect(pointer, &Pointer::motion, this, [this](const QPointF &relativeToSurface, quint32 time) { WaylandOutput *output = m_seat->backend()->findOutput(m_pointer->enteredSurface()); diff --git a/src/backends/wayland/wayland_backend.h b/src/backends/wayland/wayland_backend.h index 01c73af149..c3970e44c7 100644 --- a/src/backends/wayland/wayland_backend.h +++ b/src/backends/wayland/wayland_backend.h @@ -115,8 +115,6 @@ private: std::unique_ptr m_pointer; std::unique_ptr m_pinchGesture; std::unique_ptr m_swipeGesture; - - uint32_t m_enteredSerial = 0; }; class WaylandInputBackend : public InputBackend @@ -220,6 +218,10 @@ public: { return m_seat.get(); } + WaylandCursor *cursor() const + { + return m_waylandCursor.get(); + } bool supportsPointerLock(); void togglePointerLock();