diff --git a/src/shell-app.c b/src/shell-app.c index 7d7b5510d..17b179cba 100644 --- a/src/shell-app.c +++ b/src/shell-app.c @@ -1081,10 +1081,6 @@ _shell_app_add_window (ShellApp *app, if (!app->running_state) create_running_state (app); - if (app->started_on_workspace >= 0) - meta_window_change_workspace_by_index (window, app->started_on_workspace, FALSE); - app->started_on_workspace = -1; - app->running_state->window_sort_stale = TRUE; app->running_state->windows = g_slist_prepend (app->running_state->windows, g_object_ref (window)); g_signal_connect_object (window, "unmanaged", G_CALLBACK(shell_app_on_unmanaged), app, 0); @@ -1098,6 +1094,10 @@ _shell_app_add_window (ShellApp *app, app->running_state->interesting_windows++; shell_app_sync_running_state (app); + if (app->started_on_workspace >= 0) + meta_window_change_workspace_by_index (window, app->started_on_workspace, FALSE); + app->started_on_workspace = -1; + g_object_thaw_notify (G_OBJECT (app)); g_signal_emit (app, shell_app_signals[WINDOWS_CHANGED], 0);