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
This commit is contained in:
committed by
Florian Müllner
parent
d424b0f645
commit
9410bdfad6
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user