[mutter] compositor: Add a "feedback" window group



commit 9a825d9bee5a854f0154c9600e49d1210094a1fc
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Oct 6 16:46:26 2014 +0200

    compositor: Add a "feedback" window group
    
    Although not strictly a window group... This ClutterActor is
    meant to stay always on top, and only show non-reactive actors
    created by Mutter itself. Two possible usecases for this layer
    are DnD surfaces, and touch spots.
    
    We might also want to move cursors out of an overlay in MetaStage
    into here at some point.

 src/compositor/compositor-private.h |    2 +-
 src/compositor/compositor.c         |   15 +++++++++++++++
 src/meta/compositor-mutter.h        |    1 +
 3 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/compositor-private.h b/src/compositor/compositor-private.h
index a41f563..80fb4e2 100644
--- a/src/compositor/compositor-private.h
+++ b/src/compositor/compositor-private.h
@@ -23,7 +23,7 @@ struct _MetaCompositor
   guint           server_time_is_monotonic_time : 1;
   guint           no_mipmaps  : 1;
 
-  ClutterActor          *stage, *window_group, *top_window_group;
+  ClutterActor          *stage, *window_group, *top_window_group, *feedback_group;
   ClutterActor          *background_actor;
   GList                 *windows;
   Window                 output;
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index 47bea31..cc542c4 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -186,6 +186,19 @@ meta_get_top_window_group_for_screen (MetaScreen *screen)
 }
 
 /**
+ * meta_get_feedback_group_for_screen:
+ * @screen: a #MetaScreen
+ *
+ * Returns: (transfer none): The feedback group corresponding to @screen
+ */
+ClutterActor *
+meta_get_feedback_group_for_screen (MetaScreen *screen)
+{
+  MetaCompositor *compositor = get_compositor_for_screen (screen);
+  return compositor->feedback_group;
+}
+
+/**
  * meta_get_window_actors:
  * @screen: a #MetaScreen
  *
@@ -478,9 +491,11 @@ meta_compositor_manage (MetaCompositor *compositor)
 
   compositor->window_group = meta_window_group_new (screen);
   compositor->top_window_group = meta_window_group_new (screen);
+  compositor->feedback_group = meta_window_group_new (screen);
 
   clutter_actor_add_child (compositor->stage, compositor->window_group);
   clutter_actor_add_child (compositor->stage, compositor->top_window_group);
+  clutter_actor_add_child (compositor->stage, compositor->feedback_group);
 
   if (meta_is_wayland_compositor ())
     {
diff --git a/src/meta/compositor-mutter.h b/src/meta/compositor-mutter.h
index ee120ed..66c6138 100644
--- a/src/meta/compositor-mutter.h
+++ b/src/meta/compositor-mutter.h
@@ -37,6 +37,7 @@ Window        meta_get_overlay_window           (MetaScreen *screen);
 GList        *meta_get_window_actors            (MetaScreen *screen);
 ClutterActor *meta_get_window_group_for_screen  (MetaScreen *screen);
 ClutterActor *meta_get_top_window_group_for_screen (MetaScreen *screen);
+ClutterActor *meta_get_feedback_group_for_screen (MetaScreen *screen);
 
 void        meta_disable_unredirect_for_screen  (MetaScreen *screen);
 void        meta_enable_unredirect_for_screen   (MetaScreen *screen);


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