core: Move code ignoring events on windows with modals to Wayland

This is Wayland specific code, handle it directly in MetaWaylandPointer.
This also fixes issues with the crossing event itself managing to reach
the window occluded by modals.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
This commit is contained in:
Carlos Garnacho 2023-11-22 00:32:54 +01:00 committed by Robert Mader
parent f46205417f
commit 93a9e7f3f4
2 changed files with 3 additions and 1 deletions

View File

@ -475,7 +475,6 @@ meta_display_handle_event (MetaDisplay *display,
* trigger ::captured-event handlers along the way.
*/
bypass_clutter = !IS_GESTURE_EVENT (event_type);
bypass_wayland = meta_window_has_modals (window);
meta_window_handle_ungrabbed_event (window, event);

View File

@ -573,6 +573,9 @@ repick_for_event (MetaWaylandPointer *pointer,
META_SURFACE_ACTOR_WAYLAND (actor);
surface = meta_surface_actor_wayland_get_surface (actor_wayland);
if (meta_window_has_modals (meta_wayland_surface_get_window (surface)))
surface = NULL;
}
else
{