window-actor: Freeze subsurfaces as well

In order to prevent glitches in animations, make sure we freeze all
surfaces of a window actor.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1339
This commit is contained in:
Robert Mader 2020-06-29 15:15:46 +02:00 committed by Georges Basile Stavracas Neto
parent 22902a5e2c
commit 1c1c8b25ed
2 changed files with 11 additions and 6 deletions

View File

@ -545,6 +545,9 @@ meta_surface_actor_set_frozen (MetaSurfaceActor *self,
MetaSurfaceActorPrivate *priv = MetaSurfaceActorPrivate *priv =
meta_surface_actor_get_instance_private (self); meta_surface_actor_get_instance_private (self);
if (priv->frozen == frozen)
return;
priv->frozen = frozen; priv->frozen = frozen;
if (!frozen && priv->pending_damage) if (!frozen && priv->pending_damage)

View File

@ -261,13 +261,15 @@ static void
meta_window_actor_set_frozen (MetaWindowActor *self, meta_window_actor_set_frozen (MetaWindowActor *self,
gboolean frozen) gboolean frozen)
{ {
MetaWindowActorPrivate *priv = ClutterActor *child;
meta_window_actor_get_instance_private (self); ClutterActorIter iter;
if (meta_surface_actor_is_frozen (priv->surface) == frozen) clutter_actor_iter_init (&iter, CLUTTER_ACTOR (self));
return; while (clutter_actor_iter_next (&iter, &child))
{
meta_surface_actor_set_frozen (priv->surface, frozen); if (META_IS_SURFACE_ACTOR (child))
meta_surface_actor_set_frozen (META_SURFACE_ACTOR (child), frozen);
}
META_WINDOW_ACTOR_GET_CLASS (self)->set_frozen (self, frozen); META_WINDOW_ACTOR_GET_CLASS (self)->set_frozen (self, frozen);
} }