From 9410bdfad6744fa8dbedf49b15dee3c3e34fb1c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 6 Oct 2018 17:44:59 +0200 Subject: [PATCH] window-list: Ignore hidden buttons when scrolling Window lists are per-monitor, so workspaces are implemented by simply hiding all buttons that correspond to windows/apps on other workspaces. That means we need to take the visibility into account when handling scroll-events to switch through the list, or else we'll end up switching "randomly" between workspaces. https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/78 --- extensions/window-list/extension.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index dd165afd..b8ab37b5 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -898,7 +898,9 @@ class WindowList { else return; - let children = this._windowList.get_children().map(a => a._delegate); + let children = this._windowList.get_children() + .filter(c => c.visible) + .map(a => a._delegate); let active = children.findIndex(c => c.active); let newActive = Math.max(0, Math.min(active + diff, children.length-1)); children[newActive].activate();