wayland: Make implicit grabs during popups be owner_events=TRUE

Getting crossing events is necessary between client surfaces while
there is a popup grab in effect (e.g. allow press-drag-release in
menus), we should only stick with the focus surface while the pointer
is outside any client surface.

This partially undoes commit 79050004b0 (or, at least, mutter no
longer fixes the bug it claimed to fix). This will be addressed in
gtk4.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1885>
This commit is contained in:
Carlos Garnacho 2021-06-03 16:25:13 +02:00 committed by Marge Bot
parent 8478db96f9
commit fcdda41def

View File

@ -113,15 +113,12 @@ popup_grab_focus (MetaWaylandPointerGrab *grab,
if (!meta_wayland_seat_has_pointer (seat))
return;
if (pointer->button_count > 0)
return;
/* Popup grabs are in owner-events mode (ie, events for the same client
are reported as normal) */
if (surface &&
wl_resource_get_client (surface->resource) == popup_grab->grab_client)
meta_wayland_pointer_set_focus (grab->pointer, surface);
else
else if (pointer->button_count == 0)
meta_wayland_pointer_set_focus (grab->pointer, NULL);
}