From 79d981aac9b0cdf19d96b47754b5f20a80e60c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Sun, 3 May 2020 23:33:19 +0200 Subject: [PATCH] wayland/actor-surface: Factor in mapped clones in mapped check We started listening to notify::mapped with commit 5eb5f724347ae8d141ef38b36565169c60c53ab1 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 --- src/wayland/meta-wayland-actor-surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-actor-surface.c b/src/wayland/meta-wayland-actor-surface.c index b6c6918c3..7041aa118 100644 --- a/src/wayland/meta-wayland-actor-surface.c +++ b/src/wayland/meta-wayland-actor-surface.c @@ -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);