All pastes #2095832 Raw Edit

Mine

public text v1 · immutable
#2095832 ·published 2011-11-25 13:17 UTC
rendered paste body
--- /usr/share/gnome-shell/js/ui/altTab.js.old	2011-11-25 10:21:14.161993561 +0800
+++ /usr/share/gnome-shell/js/ui/altTab.js	2011-11-25 21:12:04.178685966 +0800
@@ -161,7 +161,7 @@
         // standard Alt+Tab order (MRU except for minimized windows),
         // and allApps is a list of apps that only appear on other
         // workspaces, sorted by user_time, which is good enough.
-        return [apps, allApps];
+        return [apps, []]; //allApps];
     },
 
     show : function(backward, binding, mask) {
@@ -893,7 +893,14 @@
             let appIcon = new AppIcon(localApps[i]);
             // Cache the window list now; we don't handle dynamic changes here,
             // and we don't want to be continually retrieving it
-            appIcon.cachedWindows = appIcon.app.get_windows();
+            let appWindows = appIcon.app.get_windows();
+            let cachedWindows = [];
+            for (let w = 0; w < appWindows.length; w++) {
+                if (appWindows[w].get_workspace() == activeWorkspace){
+                   cachedWindows.push(appWindows[w]);
+                }
+            }
+            appIcon.cachedWindows = cachedWindows;
             workspaceIcons.push(appIcon);
         }
         for (let i = 0; i < otherApps.length; i++) {
@@ -1066,6 +1073,9 @@
         this._windows = windows;
 
         for (let i = 0; i < windows.length; i++) {
+            if (windows[i].get_workspace() != activeWorkspace) {
+              continue;
+            }
             if (!separatorAdded && windows[i].get_workspace() != activeWorkspace) {
               this.addSeparator();
               separatorAdded = true;