From eed972cef1996cab355cf2ecbb41ff1e3f8b6ce0 Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Sun, 27 Oct 2024 09:10:09 +0100 Subject: [PATCH] input: clear pointer focus on touch input Otherwise the pointer focus could interfere with touch input, like showing hover effect on unexpected locations. --- src/input/touch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/input/touch.c b/src/input/touch.c index fc330d89..07666799 100644 --- a/src/input/touch.c +++ b/src/input/touch.c @@ -123,6 +123,9 @@ handle_touch_down(struct wl_listener *listener, void *data) int touch_point_count = wl_list_length(&seat->touch_points); if (touch_point->surface) { + /* Clear focus to not interfere with touch input */ + wlr_seat_pointer_notify_clear_focus(seat->seat); + /* Convert coordinates: first [0, 1] => layout */ double lx, ly; wlr_cursor_absolute_to_layout_coords(seat->cursor,