From a9a011081826e76799361d7e5aa64eec6e8a3c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 6 Dec 2019 22:20:45 +0100 Subject: [PATCH] wayland/actor-surface: Always consider unmapped actors not on output This avoids using bogus geometric values from an unmapped actor to determine whether an actor is on a logical monitor or not. This would happen when committing to a subsurface of a yet to be mapped toplevel. https://gitlab.gnome.org/GNOME/mutter/merge_requests/961 (cherry picked from commit 6d15231f10a22ee96f32dee9df8db8296c73376f) --- src/wayland/meta-wayland-actor-surface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wayland/meta-wayland-actor-surface.c b/src/wayland/meta-wayland-actor-surface.c index cdcc6b1ca..13f13bcf6 100644 --- a/src/wayland/meta-wayland-actor-surface.c +++ b/src/wayland/meta-wayland-actor-surface.c @@ -292,6 +292,9 @@ meta_wayland_actor_surface_is_on_logical_monitor (MetaWaylandSurfaceRole *surfac MetaRectangle logical_monitor_layout; gboolean is_on_monitor; + if (!clutter_actor_is_mapped (actor)) + return FALSE; + clutter_actor_get_transformed_position (actor, &x, &y); clutter_actor_get_transformed_size (actor, &width, &height);