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
This commit is contained in:
Olivier Fourdan 2019-12-06 16:35:37 +01:00
parent 53fce8e988
commit c3c54e8ce6
2 changed files with 11 additions and 10 deletions

View File

@ -442,15 +442,6 @@ meta_surface_actor_get_opaque_region (MetaSurfaceActor *self)
return meta_shaped_texture_get_opaque_region (priv->texture); 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 void
meta_surface_actor_process_damage (MetaSurfaceActor *self, meta_surface_actor_process_damage (MetaSurfaceActor *self,
int x, int y, int width, int height) int x, int y, int width, int height)
@ -458,7 +449,7 @@ meta_surface_actor_process_damage (MetaSurfaceActor *self,
MetaSurfaceActorPrivate *priv = MetaSurfaceActorPrivate *priv =
meta_surface_actor_get_instance_private (self); 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 /* The window is frozen due to an effect in progress: we ignore damage
* here on the off chance that this will stop the corresponding * 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 * MetaWindow *
meta_surface_actor_get_window (MetaSurfaceActor *self) meta_surface_actor_get_window (MetaSurfaceActor *self)
{ {

View File

@ -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_visible (MetaSurfaceActor *actor);
gboolean meta_surface_actor_is_opaque (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, void meta_surface_actor_set_frozen (MetaSurfaceActor *actor,
gboolean frozen); gboolean frozen);