From dc232d4631b9d31200c89013625f1015a3b6e546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steve=20Fr=C3=A9cinaux?= Date: Wed, 14 Oct 2009 11:45:57 +0200 Subject: [PATCH] [AppSwitcher] Add a separator between windows in current and other workspaces. This make it is easier for the user to figure out on which workspace the windows are. For instance, terminals related to various activities and put on different workspaces were previously displayed as an uniform list, with no visible distinction between the ones from the current workspace and the others. Now they are physically separated by a thin gray line. This is also consistent with the way applications are displayed in the AppSwitcher. https://bugzilla.gnome.org/show_bug.cgi?id=597944 --- js/ui/altTab.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/ui/altTab.js b/js/ui/altTab.js index da4c99641..a1a5f1612 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -724,7 +724,19 @@ ThumbnailList.prototype = { _init : function(windows) { SwitcherList.prototype._init.call(this); + let activeWorkspace = global.screen.get_active_workspace(); + + // We fake the value of "separatorAdded" when the app has no window + // on the current workspace, to avoid displaying a useless separator in + // that case. + let separatorAdded = windows.length == 0 || windows[0].get_workspace() != activeWorkspace; + for (let i = 0; i < windows.length; i++) { + if (!separatorAdded && windows[i].get_workspace() != activeWorkspace) { + this.addSeparator(); + separatorAdded = true; + } + let mutterWindow = windows[i].get_compositor_private(); let windowTexture = mutterWindow.get_texture (); let [width, height] = windowTexture.get_size();