ShellApp: don't use the app proxy before it's created

The application proxy is created asynchrously after the dbus name
is registed. This means that when tracking the first window (and
therefore creating the first window GActionGroup) there is no
app proxy yet.

https://bugzilla.gnome.org/show_bug.cgi?id=633028
This commit is contained in:
Giovanni Campagna 2012-01-09 16:34:59 +01:00
parent 7da39031e1
commit f4d13b9801

View File

@ -571,7 +571,7 @@ shell_app_update_window_actions (ShellApp *app, MetaWindow *window)
actions = g_object_get_data (G_OBJECT (window), "actions");
if (actions == NULL)
{
actions = G_ACTION_GROUP (g_dbus_action_group_get (g_dbus_proxy_get_connection (app->running_state->app_proxy),
actions = G_ACTION_GROUP (g_dbus_action_group_get (g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL),
meta_window_get_dbus_unique_name (window),
object_path));
g_object_set_data_full (G_OBJECT (window), "actions", actions, g_object_unref);