diff --git a/src/compositor/compositor-private.h b/src/compositor/compositor-private.h index 0176d1078..acb8d3c22 100644 --- a/src/compositor/compositor-private.h +++ b/src/compositor/compositor-private.h @@ -38,7 +38,7 @@ struct _MetaCompScreen { MetaScreen *screen; - ClutterActor *stage, *window_group, *overlay_group; + ClutterActor *stage, *window_group, *top_window_group, *overlay_group; ClutterActor *background_actor; GList *windows; GHashTable *windows_by_xid; diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index 3cc6c9c72..91b076734 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -237,6 +237,23 @@ meta_get_window_group_for_screen (MetaScreen *screen) return info->window_group; } +/** + * meta_get_top_window_group_for_screen: + * @screen: a #MetaScreen + * + * Returns: (transfer none): The top window group corresponding to @screen + */ +ClutterActor * +meta_get_top_window_group_for_screen (MetaScreen *screen) +{ + MetaCompScreen *info = meta_screen_get_compositor_data (screen); + + if (!info) + return NULL; + + return info->top_window_group; +} + /** * meta_get_background_actor_for_screen: * @screen: a #MetaScreen @@ -588,6 +605,7 @@ meta_compositor_manage_screen (MetaCompositor *compositor, } info->window_group = meta_window_group_new (screen); + info->top_window_group = meta_window_group_new (screen); info->background_actor = meta_background_actor_new_for_screen (screen); info->overlay_group = clutter_group_new (); @@ -597,6 +615,7 @@ meta_compositor_manage_screen (MetaCompositor *compositor, clutter_container_add (CLUTTER_CONTAINER (info->stage), info->window_group, + info->top_window_group, info->overlay_group, NULL); diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index f28452e47..9980fe6f7 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -1524,6 +1524,7 @@ meta_window_actor_new (MetaWindow *window) MetaWindowActorPrivate *priv; MetaFrame *frame; Window top_window; + ClutterActor *window_group; frame = meta_window_get_frame (window); if (frame) @@ -1556,8 +1557,14 @@ meta_window_actor_new (MetaWindow *window) /* Hang our compositor window state off the MetaWindow for fast retrieval */ meta_window_set_compositor_private (window, G_OBJECT (self)); - clutter_container_add_actor (CLUTTER_CONTAINER (info->window_group), - CLUTTER_ACTOR (self)); + if (window->layer == META_LAYER_OVERRIDE_REDIRECT) + window_group = info->top_window_group; + else + window_group = info->window_group; + + clutter_container_add_actor (CLUTTER_CONTAINER (window_group), + CLUTTER_ACTOR (self)); + clutter_actor_hide (CLUTTER_ACTOR (self)); /* Initial position in the stack is arbitrary; stacking will be synced diff --git a/src/meta/compositor-mutter.h b/src/meta/compositor-mutter.h index e196c655f..161cfad90 100644 --- a/src/meta/compositor-mutter.h +++ b/src/meta/compositor-mutter.h @@ -39,6 +39,7 @@ ClutterActor *meta_get_overlay_group_for_screen (MetaScreen *screen); 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); void meta_disable_unredirect_for_screen (MetaScreen *screen); void meta_enable_unredirect_for_screen (MetaScreen *screen);