[gnome-shell/wip/rewindow: 9/10] workspace: Have a stable window order



commit 73eeff9519e9b31f3e2e429aea8c039ffd8c4f83
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Aug 8 18:17:11 2012 -0300

    workspace: Have a stable window order
    
    https://bugzilla.gnome.org/show_bug.cgi?id=582650

 js/ui/workspace.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 11258dd..862828f 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -1028,6 +1028,11 @@ const Workspace = new Lang.Class({
         }
 
         let clones = this._windows.slice();
+
+        clones.sort(function(a, b) {
+            return a.metaWindow.get_stable_sequence() - b.metaWindow.get_stable_sequence();
+        });
+
         if (this._reservedSlot)
             clones.push(this._reservedSlot);
 



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