[gnome-shell] [AppIcon] Sort minimized windows after normal ones in AppIcon menu
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] [AppIcon] Sort minimized windows after normal ones in AppIcon menu
- Date: Mon, 28 Sep 2009 13:44:58 +0000 (UTC)
commit d4a2f9e6042ac744bf47b74aaeaea16c24fd1026
Author: Dan Winship <danw gnome org>
Date: Sat Sep 26 10:59:21 2009 -0400
[AppIcon] Sort minimized windows after normal ones in AppIcon menu
https://bugzilla.gnome.org/show_bug.cgi?id=596389
js/ui/appIcon.js | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/appIcon.js b/js/ui/appIcon.js
index b5d8193..eb08eae 100644
--- a/js/ui/appIcon.js
+++ b/js/ui/appIcon.js
@@ -160,13 +160,15 @@ AppIcon.prototype = {
_resortWindows: function() {
this.windows.sort(function (a, b) {
- let timeA = a.get_user_time();
- let timeB = b.get_user_time();
- if (timeA == timeB)
- return 0;
- else if (timeA > timeB)
+ let visA = a.showing_on_its_workspace();
+ let visB = b.showing_on_its_workspace();
+
+ if (visA && !visB)
return -1;
- return 1;
+ else if (visB && !visA)
+ return 1;
+ else
+ return b.get_user_time() - a.get_user_time();
});
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]