From: Jens Peters Date: Sun, 27 Oct 2024 08:10:09 +0000 (+0100) Subject: input: clear pointer focus on touch input X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=eed972cef1996cab355cf2ecbb41ff1e3f8b6ce0;p=proto%2Flabwc.git input: clear pointer focus on touch input Otherwise the pointer focus could interfere with touch input, like showing hover effect on unexpected locations. --- 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,