wayland: Update input device before repick

When a Wayland window is mapped or unmapped, the Wayland compositor is
expected to send the coorespoindign `wl_pointer` enter/leave events to
the affected clients.

To do so, mutter calls `meta_wayland_compositor_repick()` which
eventually calls `meta_wayland_pointer_repick()` and
`repick_for_event()`.

If pointer input device has not been updated yet, the old clutter actor
is picked and no enter/leave event is emitted.

Make sure we update the pointer input device prior to do the repick to
get the actual `ClutterActor` under the pointer.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/1016
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1026
This commit is contained in:
Olivier Fourdan 2020-01-29 14:58:02 +01:00
parent 8b3bc1f97d
commit a382698acc

View File

@ -1028,6 +1028,7 @@ meta_wayland_pointer_start_popup_grab (MetaWaylandPointer *pointer,
void void
meta_wayland_pointer_repick (MetaWaylandPointer *pointer) meta_wayland_pointer_repick (MetaWaylandPointer *pointer)
{ {
clutter_input_device_update (pointer->device, NULL, FALSE);
repick_for_event (pointer, NULL); repick_for_event (pointer, NULL);
} }