From a382698acc836287b25620a5155cf52579a043b4 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 29 Jan 2020 14:58:02 +0100 Subject: [PATCH] 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 --- src/wayland/meta-wayland-pointer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 325467f27..ee69e13dc 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -1028,6 +1028,7 @@ meta_wayland_pointer_start_popup_grab (MetaWaylandPointer *pointer, void meta_wayland_pointer_repick (MetaWaylandPointer *pointer) { + clutter_input_device_update (pointer->device, NULL, FALSE); repick_for_event (pointer, NULL); }