diff --git a/client/displayservers/Wayland/wayland.c b/client/displayservers/Wayland/wayland.c index 72b30bc6..3bdfffb3 100644 --- a/client/displayservers/Wayland/wayland.c +++ b/client/displayservers/Wayland/wayland.c @@ -391,9 +391,18 @@ static void relativePointerMotionHandler(void * data, wl_fixed_t dxW, wl_fixed_t dyW, wl_fixed_t dxUnaccelW, wl_fixed_t dyUnaccelW) { - double dxUnaccel = wl_fixed_to_double(dxUnaccelW); - double dyUnaccel = wl_fixed_to_double(dyUnaccelW); - app_handleMouseGrabbed(dxUnaccel, dyUnaccel); + 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); } static const struct zwp_relative_pointer_v1_listener relativePointerListener = {