[gnome-shell] app: Stop using window visibility when comparing apps



commit 1dfc38d07852b80044bc97a6882880ebb3e818bd
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Sep 6 22:21:12 2013 +0200

    app: Stop using window visibility when comparing apps
    
    shell_app_compare() (which is only used as sort function for
    shell_app_system_get_running() nowadays) currently takes the
    visibility of an app's windows into account, e.g. applications
    with visible windows (non-minimized windows on current workspace)
    sort earlier than applications without.
    This translate traditional window-switcher behavior to applications,
    but we stopped sorting by workspace in the app-switcher a while ago,
    and with the new auto-minimization behavior of fullscreen windows
    it is more confusing than helpful - in fact, since mutter commit
    7e61ef09369a we no longer do this for the window list, so it
    makes sense to apply the same to application sorting.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707663

 src/shell-app.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index 9fa6592..0987648 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -841,9 +841,7 @@ shell_app_get_last_user_time (ShellApp *app)
  *
  * Compare one #ShellApp instance to another, in the following way:
  *   - Running applications sort before not-running applications.
- *   - If one of them has visible windows and the other does not, the one
- *     with visible windows is first.
- *   - Finally, the application which the user interacted with most recently
+ *   - The application which the user interacted with most recently
  *     compares earlier.
  */
 int
@@ -859,14 +857,6 @@ shell_app_compare (ShellApp *app,
       return 1;
     }
 
-  vis_app = shell_app_has_visible_windows (app);
-  vis_other = shell_app_has_visible_windows (other);
-
-  if (vis_app && !vis_other)
-    return -1;
-  else if (!vis_app && vis_other)
-    return 1;
-
   if (app->state == SHELL_APP_STATE_RUNNING)
     {
       if (app->running_state->windows && !other->running_state->windows)


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