[gnome-shell] shell-app: Don't transition to STOPPED while still in the STARTING state



commit b5f5a594ba7ad96bf9d9a2bbda214dd7e33f7d47
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Fri Sep 29 11:47:31 2017 +0100

    shell-app: Don't transition to STOPPED while still in the STARTING state
    
    Similar to what it's done in _shell_app_add_window(), rely on calling
    shell_app_sync_running_state() when removing windows too, to avoid
    transitioning to STOPPED while it's still in the STARTING state.
    
    This makes the logic compliant with the startup notification spec and
    prevents stopping an application too early if it has a splash screen
    that has been closed before the application's main window is shown.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787905

 src/shell-app.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index 335147c..dbf537c 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -1067,16 +1067,10 @@ _shell_app_remove_window (ShellApp   *app,
 
   if (!meta_window_is_skip_taskbar (window))
     app->running_state->interesting_windows--;
+  shell_app_sync_running_state (app);
 
   if (app->running_state->windows == NULL)
-    {
-      g_clear_pointer (&app->running_state, unref_running_state);
-      shell_app_state_transition (app, SHELL_APP_STATE_STOPPED);
-    }
-  else
-    {
-      shell_app_sync_running_state (app);
-    }
+    g_clear_pointer (&app->running_state, unref_running_state);
 
   g_signal_emit (app, shell_app_signals[WINDOWS_CHANGED], 0);
 }


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