wayland/subsurface: Fix actor hiding in sync_actor_subsurface_state

Unmapped sub-surfaces need to be hidden instead of just ignored.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3364>
This commit is contained in:
Michel Dänzer 2023-11-02 17:47:22 +01:00 committed by Marge Bot
parent 6fd77ce515
commit 66408f907f

View File

@ -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);
}