diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c index e9bfa8126..8ffc2cd8a 100644 --- a/src/compositor/meta-surface-actor.c +++ b/src/compositor/meta-surface-actor.c @@ -62,6 +62,7 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (MetaSurfaceActor, meta_surface_actor, CLUTTER_ enum { REPAINT_SCHEDULED, + UPDATE_SCHEDULED, SIZE_CHANGED, LAST_SIGNAL, @@ -293,6 +294,14 @@ meta_surface_actor_class_init (MetaSurfaceActorClass *klass) NULL, NULL, NULL, G_TYPE_NONE, 0); + signals[UPDATE_SCHEDULED] = g_signal_new ("update-scheduled", + G_TYPE_FROM_CLASS (object_class), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, NULL, + G_TYPE_NONE, 0); + + signals[SIZE_CHANGED] = g_signal_new ("size-changed", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, @@ -393,6 +402,17 @@ meta_surface_actor_get_texture (MetaSurfaceActor *self) return priv->texture; } +void +meta_surface_actor_schedule_update (MetaSurfaceActor *self) +{ + ClutterStage *stage = + CLUTTER_STAGE (clutter_actor_get_stage (CLUTTER_ACTOR (self))); + + clutter_stage_schedule_update (stage); + + g_signal_emit (self, signals[UPDATE_SCHEDULED], 0); +} + void meta_surface_actor_update_area (MetaSurfaceActor *self, int x, diff --git a/src/compositor/meta-surface-actor.h b/src/compositor/meta-surface-actor.h index 2823076b3..7c5b5b80b 100644 --- a/src/compositor/meta-surface-actor.h +++ b/src/compositor/meta-surface-actor.h @@ -49,6 +49,8 @@ void meta_surface_actor_set_opaque_region (MetaSurfaceActor *self, MtkRegion *region); MtkRegion * meta_surface_actor_get_opaque_region (MetaSurfaceActor *self); +void meta_surface_actor_schedule_update (MetaSurfaceActor *self); + void meta_surface_actor_process_damage (MetaSurfaceActor *actor, int x, int y, int width, int height);