1
0
Fork 0

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 =
meta_surface_actor_get_instance_private (self);
if (priv->frozen == frozen)
return;
priv->frozen = frozen;
if (!frozen && priv->pending_damage)

View file

@ -261,13 +261,15 @@ static void
meta_window_actor_set_frozen (MetaWindowActor *self,
gboolean frozen)
{
MetaWindowActorPrivate *priv =
meta_window_actor_get_instance_private (self);
ClutterActor *child;
ClutterActorIter iter;
if (meta_surface_actor_is_frozen (priv->surface) == frozen)
return;
meta_surface_actor_set_frozen (priv->surface, frozen);
clutter_actor_iter_init (&iter, CLUTTER_ACTOR (self));
while (clutter_actor_iter_next (&iter, &child))
{
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);
}