[gnome-shell-extensions/wip/fmuellner/window-list-scrolling: 3/3] window-list: Ignore hidden buttons when scrolling
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/wip/fmuellner/window-list-scrolling: 3/3] window-list: Ignore hidden buttons when scrolling
- Date: Sat, 6 Oct 2018 16:06:04 +0000 (UTC)
commit 9410bdfad6744fa8dbedf49b15dee3c3e34fb1c0
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Oct 6 17:44:59 2018 +0200
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 dd165af..b8ab37b 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();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]