From b63e94af31e6aa6f7d22c9ad43a98eee951fb39b Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 31 Aug 2020 10:30:06 -0300 Subject: [PATCH] meta/stage: Process BEFORE_PAINT watchers at ClutterStage.before_paint This way, watches can properly get notified about before-paint without having to connect to the corresponding signal. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1421 --- src/backends/meta-stage.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/backends/meta-stage.c b/src/backends/meta-stage.c index f2040362f..75244de03 100644 --- a/src/backends/meta-stage.c +++ b/src/backends/meta-stage.c @@ -192,6 +192,16 @@ notify_watchers_for_mode (MetaStage *stage, } } +static void +meta_stage_before_paint (ClutterStage *stage, + ClutterStageView *view) +{ + MetaStage *meta_stage = META_STAGE (stage); + + notify_watchers_for_mode (meta_stage, view, NULL, + META_STAGE_WATCH_BEFORE_PAINT); +} + static void meta_stage_paint (ClutterActor *actor, ClutterPaintContext *paint_context) @@ -246,9 +256,6 @@ meta_stage_paint_view (ClutterStage *stage, { MetaStage *meta_stage = META_STAGE (stage); - notify_watchers_for_mode (meta_stage, view, NULL, - META_STAGE_WATCH_BEFORE_PAINT); - CLUTTER_STAGE_CLASS (meta_stage_parent_class)->paint_view (stage, view, redraw_clip); @@ -298,6 +305,7 @@ meta_stage_class_init (MetaStageClass *klass) stage_class->activate = meta_stage_activate; stage_class->deactivate = meta_stage_deactivate; + stage_class->before_paint = meta_stage_before_paint; stage_class->paint_view = meta_stage_paint_view; signals[ACTORS_PAINTED] = g_signal_new ("actors-painted",