From 1ef79265e7a7f17dcac30994fdb25ace813d4ee5 Mon Sep 17 00:00:00 2001 From: lkn Date: Thu, 25 Jun 2026 07:12:57 +0200 Subject: [PATCH] wayland: fix pointer warp using wlr_cursor_warp_closest wlr_cursor_warp with NULL device silently fails (returns false) if the target coordinates fall outside the output layout bounds. This made pointer warping appear completely broken. Switch to wlr_cursor_warp_closest which clamps to the nearest valid point on the output layout, ensuring the cursor always moves. --- src/backend/wayland/wl_pointer_focus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/wayland/wl_pointer_focus.c b/src/backend/wayland/wl_pointer_focus.c index 67faebf..34a085e 100644 --- a/src/backend/wayland/wl_pointer_focus.c +++ b/src/backend/wayland/wl_pointer_focus.c @@ -268,7 +268,7 @@ void wl_pointer_warp_to(int x, int y) { if (wl_state.cursor) { - wlr_cursor_warp(wl_state.cursor, NULL, (double)x, (double)y); + wlr_cursor_warp_closest(wl_state.cursor, NULL, (double)x, (double)y); wl_state.pointer_x = (int)wl_state.cursor->x; wl_state.pointer_y = (int)wl_state.cursor->y; } else {