From 79d325dfe771ebbe67b9befb006a5c6efa057245 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Sat, 6 Dec 2025 12:49:09 -0500 Subject: [PATCH] cursor: don't synthesize relative motion events from absolute events It seems to have been inherited behavior from tinywl, but it's not clear what purpose it serves, and it causes a couple of issues: - A new absolute position that's discontinuous with the previous cursor position can produce unexpectedly large relative motion deltas. This can occur for example when multiple input devices are active, or in nested/VM scenarios when the pointer leaves the windowed output and re-enters at a different point. - When the cursor position is locked via constraint, the computed deltas continue to get larger as the absolute event position diverges further from the locked position. This led to the mouse pointer going crazy in applications that use the relative events, such as games under Wine/ Wayland. --- src/input/cursor.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/input/cursor.c b/src/input/cursor.c index 2a681a6e..1fe73750 100644 --- a/src/input/cursor.c +++ b/src/input/cursor.c @@ -981,11 +981,6 @@ handle_motion_absolute(struct wl_listener *listener, void *data) double dx = lx - seat->cursor->x; double dy = ly - seat->cursor->y; - wlr_relative_pointer_manager_v1_send_relative_motion( - seat->server->relative_pointer_manager, - seat->seat, (uint64_t)event->time_msec * 1000, - dx, dy, dx, dy); - preprocess_cursor_motion(seat, event->pointer, event->time_msec, dx, dy); }