[gnome-shell/eos3.8: 11/255] shell-app: Move apps to RUNNING when they have 'interesting' windows



commit 22b9a3fcf32da1e31f338ede922c314d38f7932a
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Fri Sep 15 12:05:27 2017 +0100

    shell-app: Move apps to RUNNING when they have 'interesting' windows
    
    Previously, there was a chance an app didn't transition to RUNNING
    from the STARTING state, since no transition would happen in that
    case even when 'interesting' windows are available.

 src/shell-app.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index b4d08c3844..c9f8121093 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -952,16 +952,12 @@ shell_app_sync_running_state (ShellApp *app)
 {
   g_return_if_fail (app->running_state != NULL);
 
-  if (app->state != SHELL_APP_STATE_STARTING)
-    {
-      if (app->running_state->interesting_windows == 0)
-        shell_app_state_transition (app, SHELL_APP_STATE_STOPPED);
-      else
-        shell_app_state_transition (app, SHELL_APP_STATE_RUNNING);
-    }
+  if (app->running_state->interesting_windows > 0)
+    shell_app_state_transition (app, SHELL_APP_STATE_RUNNING);
+  else if (app->state != SHELL_APP_STATE_STARTING)
+    shell_app_state_transition (app, SHELL_APP_STATE_STOPPED);
 }
 
-
 static void
 shell_app_on_skip_taskbar_changed (MetaWindow *window,
                                    GParamSpec *pspec,


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