]> git.mdlowis.com Git - proto/labwc.git/commitdiff
input: clear pointer focus on touch input
authorJens Peters <jp7677@gmail.com>
Sun, 27 Oct 2024 08:10:09 +0000 (09:10 +0100)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Sun, 10 Nov 2024 08:08:38 +0000 (17:08 +0900)
Otherwise the pointer focus could interfere with touch input, like
showing hover effect on unexpected locations.

src/input/touch.c

index fc330d898639c03c1bf60438e96f3ef0c2f19f0e..07666799fbb47fd7a3eb212fc5a89a5576391503 100644 (file)
@@ -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,