[mutter] backends/stage: Emit signal between painting actors and overlays



commit ed5c1f433b5821a4e5e88adfcd3e6ce12b83009b
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Dec 12 11:39:18 2018 +0100

    backends/stage: Emit signal between painting actors and overlays
    
    Will be used by screen casting for embedding the cursor separately, or
    not including at all.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/357

 src/backends/meta-stage.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
---
diff --git a/src/backends/meta-stage.c b/src/backends/meta-stage.c
index 2b6f8edc5..c009f1022 100644
--- a/src/backends/meta-stage.c
+++ b/src/backends/meta-stage.c
@@ -30,6 +30,15 @@
 #include "meta/meta-monitor-manager.h"
 #include "meta/util.h"
 
+enum
+{
+  ACTORS_PAINTED,
+
+  N_SIGNALS
+};
+
+static guint signals[N_SIGNALS];
+
 struct _MetaOverlay
 {
   gboolean enabled;
@@ -142,6 +151,8 @@ meta_stage_paint (ClutterActor *actor)
 
   CLUTTER_ACTOR_CLASS (meta_stage_parent_class)->paint (actor);
 
+  g_signal_emit (stage, signals[ACTORS_PAINTED], 0);
+
   for (l = stage->overlays; l; l = l->next)
     meta_overlay_paint (l->data);
 }
@@ -179,6 +190,13 @@ meta_stage_class_init (MetaStageClass *klass)
 
   stage_class->activate = meta_stage_activate;
   stage_class->deactivate = meta_stage_deactivate;
+
+  signals[ACTORS_PAINTED] = g_signal_new ("actors-painted",
+                                          G_TYPE_FROM_CLASS (klass),
+                                          G_SIGNAL_RUN_LAST,
+                                          0,
+                                          NULL, NULL, NULL,
+                                          G_TYPE_NONE, 0);
 }
 
 static void


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