[mutter/gbsneto/more-screencast: 5/7] meta/stage: Process BEFORE_PAINT watchers at ClutterStage.before_paint
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/more-screencast: 5/7] meta/stage: Process BEFORE_PAINT watchers at ClutterStage.before_paint
- Date: Mon, 31 Aug 2020 14:09:33 +0000 (UTC)
commit 3ca08efb063a8c07bb0cedcade871ce7e12fc3be
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Aug 31 10:30:06 2020 -0300
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.
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 f2040362f7..75244de03b 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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]