[gnome-shell] Transition the ShellApp state when ready.



commit 54e3a54489988dc51450a26376b49f918f0bd6f6
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sun Nov 7 20:51:25 2010 +0100

    Transition the ShellApp state when ready.
    
    shell_app_state_transition emits a signal, so invoke it only when
    ready, or signal handlers will see an object which is in an invalid
    state.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=632501

 src/shell-app.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index d3b00cf..7dff441 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -780,9 +780,6 @@ _shell_app_add_window (ShellApp        *app,
 
   g_object_freeze_notify (G_OBJECT (app));
 
-  if (app->state != SHELL_APP_STATE_STARTING)
-    shell_app_state_transition (app, SHELL_APP_STATE_RUNNING);
-
   if (!app->running_state)
       create_running_state (app);
 
@@ -795,6 +792,9 @@ _shell_app_add_window (ShellApp        *app,
   if (user_time > app->running_state->last_user_time)
     app->running_state->last_user_time = user_time;
 
+  if (app->state != SHELL_APP_STATE_STARTING)
+    shell_app_state_transition (app, SHELL_APP_STATE_RUNNING);
+
   g_object_thaw_notify (G_OBJECT (app));
 
   g_signal_emit (app, shell_app_signals[WINDOWS_CHANGED], 0);



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