From 194afa2d7549f7586a8925738f81e53a454d4076 Mon Sep 17 00:00:00 2001 From: Quantum Date: Thu, 23 Dec 2021 18:00:59 -0500 Subject: [PATCH] [client] wayland: create wl_relative_pointer when creating wl_pointer --- client/displayservers/Wayland/input.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/client/displayservers/Wayland/input.c b/client/displayservers/Wayland/input.c index 0d9d24a6..301ecb8b 100644 --- a/client/displayservers/Wayland/input.c +++ b/client/displayservers/Wayland/input.c @@ -328,6 +328,15 @@ static void handlePointerCapability(uint32_t capabilities) wlWm.pointer = wl_seat_get_pointer(wlWm.seat); wl_pointer_add_listener(wlWm.pointer, &pointerListener, NULL); waylandSetPointer(wlWm.cursorId); + + if (wlWm.warpSupport) + { + wlWm.relativePointer = + zwp_relative_pointer_manager_v1_get_relative_pointer( + wlWm.relativePointerManager, wlWm.pointer); + zwp_relative_pointer_v1_add_listener(wlWm.relativePointer, + &relativePointerListener, NULL); + } } } @@ -399,15 +408,6 @@ bool waylandInputInit(void) wl_seat_add_listener(wlWm.seat, &seatListener, NULL); wl_display_roundtrip(wlWm.display); - if (wlWm.warpSupport) - { - wlWm.relativePointer = - zwp_relative_pointer_manager_v1_get_relative_pointer( - wlWm.relativePointerManager, wlWm.pointer); - zwp_relative_pointer_v1_add_listener(wlWm.relativePointer, - &relativePointerListener, NULL); - } - LG_LOCK_INIT(wlWm.confineLock); return true;