From 66408f907f4e3917f94574545c959d737d628091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 2 Nov 2023 17:47:22 +0100 Subject: [PATCH] wayland/subsurface: Fix actor hiding in sync_actor_subsurface_state Unmapped sub-surfaces need to be hidden instead of just ignored. Part-of: --- src/wayland/meta-wayland-subsurface.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c index 333228e28..8b1759a18 100644 --- a/src/wayland/meta-wayland-subsurface.c +++ b/src/wayland/meta-wayland-subsurface.c @@ -72,8 +72,11 @@ sync_actor_subsurface_state (MetaWaylandSurface *surface) int x, y; toplevel_window = meta_wayland_surface_get_toplevel_window (surface); - if (!toplevel_window) - return; + if (!toplevel_window || !should_show (surface)) + { + clutter_actor_hide (actor); + return; + } if (toplevel_window->client_type == META_WINDOW_CLIENT_TYPE_X11) return; @@ -84,10 +87,7 @@ sync_actor_subsurface_state (MetaWaylandSurface *surface) clutter_actor_set_position (actor, x, y); clutter_actor_set_reactive (actor, TRUE); - if (should_show (surface)) - clutter_actor_show (actor); - else - clutter_actor_hide (actor); + clutter_actor_show (actor); clutter_actor_notify_transform_invalid (actor); }