[mutter] window-actor: Freeze subsurfaces as well
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window-actor: Freeze subsurfaces as well
- Date: Wed, 14 Oct 2020 16:01:34 +0000 (UTC)
commit 1c1c8b25edf79574bd41e1517b4261d2a91fc7eb
Author: Robert Mader <robert mader posteo de>
Date: Mon Jun 29 15:15:46 2020 +0200
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
src/compositor/meta-surface-actor.c | 3 +++
src/compositor/meta-window-actor.c | 14 ++++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c
index 0fa6f64ed7..7d5f2bc5d8 100644
--- a/src/compositor/meta-surface-actor.c
+++ b/src/compositor/meta-surface-actor.c
@@ -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)
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 3b39ce9ddf..523fff8fb1 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -261,13 +261,15 @@ static void
meta_window_actor_set_frozen (MetaWindowActor *self,
gboolean frozen)
{
- MetaWindowActorPrivate *priv =
- meta_window_actor_get_instance_private (self);
-
- if (meta_surface_actor_is_frozen (priv->surface) == frozen)
- return;
+ ClutterActor *child;
+ ClutterActorIter iter;
- 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]