wayland: Bypass popup grab focus if other handlers are in effect
If other handlers (e.g. DnD) are on top of the popup grab focus, we
may want it to move outside same-client surfaces as the popup grab
specifies.
Check that it is the current handler before making same-client checks,
so that these handlers on top have an opportunity to find other
surfaces, e.g. during DnD from a popup.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1681
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3937>
(cherry picked from commit c179bebb70
)
This commit is contained in:
parent
99808a3365
commit
3bb02538b9
1 changed files with 5 additions and 2 deletions
|
@ -116,12 +116,15 @@ popup_grab_get_focus_surface (MetaWaylandEventHandler *handler,
|
|||
}
|
||||
else
|
||||
{
|
||||
MetaWaylandInput *input = meta_wayland_seat_get_input (popup_grab->seat);
|
||||
|
||||
surface = meta_wayland_event_handler_chain_up_get_focus_surface (handler,
|
||||
device,
|
||||
sequence);
|
||||
|
||||
if (surface && surface->resource &&
|
||||
wl_resource_get_client (surface->resource) == popup_grab->grab_client)
|
||||
if (!meta_wayland_input_is_current_handler (input, handler) ||
|
||||
(surface && surface->resource &&
|
||||
wl_resource_get_client (surface->resource) == popup_grab->grab_client))
|
||||
return surface;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue