From 160150d12710f26d3abb5f4889cf4f91ee0b6438 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 1 Mar 2013 14:34:41 -0500 Subject: [PATCH] compositor: don't show stage right away We don't want the stage shown until gnome-shell is ready for it. This commit ensures the stage isn't shown implicitly. https://bugzilla.gnome.org/show_bug.cgi?id=694321 --- src/compositor/compositor.c | 1 - src/compositor/plugins/default.c | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index fb682ed5f..c5021ebbc 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -611,7 +611,6 @@ meta_compositor_manage_screen (MetaCompositor *compositor, } clutter_actor_show (info->overlay_group); - clutter_actor_show (info->stage); } void diff --git a/src/compositor/plugins/default.c b/src/compositor/plugins/default.c index 71839c215..228fb19e0 100644 --- a/src/compositor/plugins/default.c +++ b/src/compositor/plugins/default.c @@ -23,6 +23,7 @@ #include #include +#include #include #define _(x) dgettext (GETTEXT_PACKAGE, x) @@ -68,6 +69,7 @@ struct _MetaDefaultPluginClass static GQuark actor_data_quark = 0; +static void start (MetaPlugin *plugin); static void minimize (MetaPlugin *plugin, MetaWindowActor *actor); static void map (MetaPlugin *plugin, @@ -191,6 +193,7 @@ meta_default_plugin_class_init (MetaDefaultPluginClass *klass) gobject_class->set_property = meta_default_plugin_set_property; gobject_class->get_property = meta_default_plugin_get_property; + plugin_class->start = start; plugin_class->map = map; plugin_class->minimize = minimize; plugin_class->maximize = maximize; @@ -282,6 +285,29 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data) meta_plugin_switch_workspace_completed (plugin); } +static gboolean +show_stage (MetaPlugin *plugin) +{ + MetaScreen *screen; + ClutterActor *stage; + + screen = meta_plugin_get_screen (plugin); + stage = meta_get_stage_for_screen (screen); + + clutter_actor_show (stage); + + return FALSE; +} + +static void +start (MetaPlugin *plugin) +{ + meta_later_add (META_LATER_BEFORE_REDRAW, + (GSourceFunc) show_stage, + plugin, + NULL); +} + static void switch_workspace (MetaPlugin *plugin, gint from, gint to,