wayland: Handle reentrancy invalidating touch foci
The hashtable containing per-sequence touch info may change while invalidating the focus, so grab a copy first of the existing sequences. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4166>
This commit is contained in:
parent
f28f31fc32
commit
c9fa30c55b
@ -176,14 +176,15 @@ meta_wayland_input_invalidate_all_focus (MetaWaylandInput *input,
|
||||
|
||||
if (meta_wayland_seat_has_touch (seat))
|
||||
{
|
||||
ClutterEventSequence *sequence;
|
||||
g_autoptr (GList) touches = NULL;
|
||||
GList *l;
|
||||
|
||||
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);
|
||||
touches = g_hash_table_get_keys (seat->touch->touches);
|
||||
for (l = touches; l; l = l->next)
|
||||
meta_wayland_event_handler_invalidate_focus (handler, device, l->data);
|
||||
}
|
||||
|
||||
if (meta_wayland_seat_has_touch (seat) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user