backends/wayland: Call wl_pointer.set_cursor when pointer enters an output
We must always call wl_pointer.set_cursor when the pointer enters the surface.
This commit is contained in:
parent
c784217eae
commit
65cd40e85d
2 changed files with 5 additions and 3 deletions
|
@ -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());
|
||||
|
|
|
@ -115,8 +115,6 @@ private:
|
|||
std::unique_ptr<KWayland::Client::Pointer> m_pointer;
|
||||
std::unique_ptr<KWayland::Client::PointerPinchGesture> m_pinchGesture;
|
||||
std::unique_ptr<KWayland::Client::PointerSwipeGesture> 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();
|
||||
|
|
Loading…
Reference in a new issue