From: Jens Peters Date: Sun, 27 Oct 2024 08:07:54 +0000 (+0100) Subject: input: warp cursor to touch coordinates X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=a3d8688c178981175f0f632dc8c96750e06f31b4;p=proto%2Flabwc.git input: warp cursor to touch coordinates This makes the behavior consistent with non-touch capable surfaces and the desktop. --- diff --git a/src/input/touch.c b/src/input/touch.c index 8557d9c7..e7c9a26e 100644 --- a/src/input/touch.c +++ b/src/input/touch.c @@ -77,6 +77,8 @@ handle_touch_motion(struct wl_listener *listener, void *data) double sx = lx - touch_point->x_offset; double sy = ly - touch_point->y_offset; + wlr_cursor_warp_absolute(seat->cursor, + &event->touch->base, event->x, event->y); wlr_seat_touch_notify_motion(seat->seat, event->time_msec, event->touch_id, sx, sy); } else { @@ -133,6 +135,8 @@ handle_touch_down(struct wl_listener *listener, void *data) } } + wlr_cursor_warp_absolute(seat->cursor, + &event->touch->base, event->x, event->y); wlr_seat_touch_notify_down(seat->seat, touch_point->surface, event->time_msec, event->touch_id, sx, sy); } else {