wayland: Invalidate focus from all touch inputs too
This allows drag-and-drop within the same surface with touch input. Test case: drag-and-drop a file into a directory in Nautilus. Prior to this change that would only work if the finger first leaves then re-enters the surface. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4091>
This commit is contained in:
parent
e44620c86e
commit
7f89e5b881
@ -174,6 +174,18 @@ meta_wayland_input_invalidate_all_focus (MetaWaylandInput *input,
|
||||
meta_wayland_event_handler_invalidate_focus (handler, device, NULL);
|
||||
}
|
||||
|
||||
if (meta_wayland_seat_has_touch (seat))
|
||||
{
|
||||
ClutterEventSequence *sequence;
|
||||
|
||||
device = clutter_seat_get_pointer (clutter_seat);
|
||||
handler = wl_container_of (input->event_handler_list.next, handler, link);
|
||||
|
||||
g_hash_table_iter_init (&iter, seat->touch->touches);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *) &sequence, NULL))
|
||||
meta_wayland_event_handler_invalidate_focus (handler, device, sequence);
|
||||
}
|
||||
|
||||
if (meta_wayland_seat_has_touch (seat) &&
|
||||
(flags & INVALIDATE_FOCUS_FLAG_CANCEL_TOUCH) != 0)
|
||||
meta_wayland_touch_cancel (seat->touch);
|
||||
|
Loading…
x
Reference in New Issue
Block a user