wayland/actor-surface: Factor in mapped clones in mapped check

We started listening to notify::mapped with commit
5eb5f72434 in order to emit
wl_surface.leave events consistently when a surface gets hidden. This
caused a problem with the ClutterClones used in the overview, since
those temporarily map and unmap the windows for painting, spamming
wl_surface.leave and enter events to all surfaces.

We can easily fix that by also treating mapped clones as mapped, which
means the surface should also be on a wl_output when the overview is
shown.

Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1141

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1235
This commit is contained in:
Jonas Dreßler 2020-05-03 23:33:19 +02:00
parent 2791f5b466
commit 79d981aac9

View File

@ -293,7 +293,8 @@ meta_wayland_actor_surface_is_on_logical_monitor (MetaWaylandSurfaceRole *surfac
MetaRectangle logical_monitor_layout;
gboolean is_on_monitor;
if (!clutter_actor_is_mapped (actor))
if (!clutter_actor_is_mapped (actor) &&
!clutter_actor_has_mapped_clones (actor))
return FALSE;
clutter_actor_get_transformed_position (actor, &x, &y);