[mutter/wip/rstrode/rhel-8.0.0: 78/117] backends/stage: Emit signal between painting actors and overlays



commit c5f0fc1276b777283aa18ebe3336edb0a669d36c
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 d1b7185e8..4ed56c04b 100644
--- a/src/backends/meta-stage.c
+++ b/src/backends/meta-stage.c
@@ -30,6 +30,15 @@
 #include "backends/meta-backend-private.h"
 #include "clutter/clutter-mutter.h"
 
+enum
+{
+  ACTORS_PAINTED,
+
+  N_SIGNALS
+};
+
+static guint signals[N_SIGNALS];
+
 struct _MetaOverlay
 {
   gboolean enabled;
@@ -141,6 +150,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 = priv->overlays; l; l = l->next)
     meta_overlay_paint (l->data);
 }
@@ -180,6 +191,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]