From aafdec02df21b47d089ac3242cb4be0337ba6b5e Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 29 Jan 2021 06:04:50 +1100 Subject: [PATCH] [client] wayland: fix mouse code post refactor --- client/displayservers/Wayland/wayland.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/client/displayservers/Wayland/wayland.c b/client/displayservers/Wayland/wayland.c index 279924f9..bda88c08 100644 --- a/client/displayservers/Wayland/wayland.c +++ b/client/displayservers/Wayland/wayland.c @@ -757,18 +757,11 @@ static void relativePointerMotionHandler(void * data, wl_fixed_t dxW, wl_fixed_t dyW, wl_fixed_t dxUnaccelW, wl_fixed_t dyUnaccelW) { - double dx, dy; - if (app_cursorWantsRaw()) - { - dx = wl_fixed_to_double(dxUnaccelW); - dy = wl_fixed_to_double(dyUnaccelW); - } - else - { - dx = wl_fixed_to_double(dxW); - dy = wl_fixed_to_double(dyW); - } - app_handleMouseGrabbed(dx, dy); + app_handleMouseRelitive( + wl_fixed_to_double(dxW), + wl_fixed_to_double(dyW), + wl_fixed_to_double(dxUnaccelW), + wl_fixed_to_double(dyUnaccelW)); } static const struct zwp_relative_pointer_v1_listener relativePointerListener = {