[mutter] surface-actor: Add `meta_surface_actor_is_frozen()`



commit c3c54e8ce66764ca4e85da1b3cee3284db55eae7
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Fri Dec 6 16:35:37 2019 +0100

    surface-actor: Add `meta_surface_actor_is_frozen()`
    
    Change the internal `is_frozen()` API to be available publicly.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/942

 src/compositor/meta-surface-actor.c | 20 ++++++++++----------
 src/compositor/meta-surface-actor.h |  1 +
 2 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c
index 104daf9a1..0871c5d4c 100644
--- a/src/compositor/meta-surface-actor.c
+++ b/src/compositor/meta-surface-actor.c
@@ -442,15 +442,6 @@ meta_surface_actor_get_opaque_region (MetaSurfaceActor *self)
   return meta_shaped_texture_get_opaque_region (priv->texture);
 }
 
-static gboolean
-is_frozen (MetaSurfaceActor *self)
-{
-  MetaSurfaceActorPrivate *priv =
-    meta_surface_actor_get_instance_private (self);
-
-  return priv->frozen;
-}
-
 void
 meta_surface_actor_process_damage (MetaSurfaceActor *self,
                                    int x, int y, int width, int height)
@@ -458,7 +449,7 @@ meta_surface_actor_process_damage (MetaSurfaceActor *self,
   MetaSurfaceActorPrivate *priv =
     meta_surface_actor_get_instance_private (self);
 
-  if (is_frozen (self))
+  if (meta_surface_actor_is_frozen (self))
     {
       /* The window is frozen due to an effect in progress: we ignore damage
        * here on the off chance that this will stop the corresponding
@@ -527,6 +518,15 @@ meta_surface_actor_set_frozen (MetaSurfaceActor *self,
     }
 }
 
+gboolean
+meta_surface_actor_is_frozen (MetaSurfaceActor *self)
+{
+  MetaSurfaceActorPrivate *priv =
+    meta_surface_actor_get_instance_private (self);
+
+  return priv->frozen;
+}
+
 MetaWindow *
 meta_surface_actor_get_window (MetaSurfaceActor *self)
 {
diff --git a/src/compositor/meta-surface-actor.h b/src/compositor/meta-surface-actor.h
index 6a5fc4e3f..1d10303a0 100644
--- a/src/compositor/meta-surface-actor.h
+++ b/src/compositor/meta-surface-actor.h
@@ -51,6 +51,7 @@ void meta_surface_actor_pre_paint (MetaSurfaceActor *actor);
 gboolean meta_surface_actor_is_visible (MetaSurfaceActor *actor);
 gboolean meta_surface_actor_is_opaque (MetaSurfaceActor *actor);
 
+gboolean meta_surface_actor_is_frozen (MetaSurfaceActor *actor);
 void meta_surface_actor_set_frozen (MetaSurfaceActor *actor,
                                     gboolean          frozen);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]