wayland/transaction: Call sync_actor_state for unmapped sub-surfaces

This is necessary to make sure the unmapped sub-surface is no longer
visible.

v2:
* Use META_IS_WAYLAND_SUBSURFACE (Jonas Ådahl)
* Use same sequence of assignments in both cases

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

View File

@ -70,16 +70,24 @@ static void
meta_wayland_transaction_sync_child_states (MetaWaylandSurface *surface)
{
MetaWaylandSurface *subsurface_surface;
MetaWaylandSubsurface *subsurface;
MetaWaylandActorSurface *actor_surface;
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state, subsurface_surface)
{
MetaWaylandSubsurface *subsurface;
MetaWaylandActorSurface *actor_surface;
subsurface = META_WAYLAND_SUBSURFACE (subsurface_surface->role);
actor_surface = META_WAYLAND_ACTOR_SURFACE (subsurface);
meta_wayland_actor_surface_sync_actor_state (actor_surface);
}
if (!surface->output_state.parent &&
surface->role && META_IS_WAYLAND_SUBSURFACE (surface->role))
{
/* Unmapped sub-surface */
subsurface = META_WAYLAND_SUBSURFACE (surface->role);
actor_surface = META_WAYLAND_ACTOR_SURFACE (subsurface);
meta_wayland_actor_surface_sync_actor_state (actor_surface);
}
}
static void