Created
October 9, 2019 04:04
-
-
Save itzexor/102fb3da0092f787456ecb988106bf2b to your computer and use it in GitHub Desktop.
Revisions
-
itzexor revised this gist
Oct 9, 2019 . 1 changed file with 7 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,17 +2,13 @@ let direction = event.get_scroll_direction(); // Find the current focused window let windows = this.actor.get_parent().get_children(); let i = windows.length - 1; while (i > -1) { if (windows[i].visible && windows[i]._delegate.metaWindow.has_focus()) break; i--; } if (i == -1) return; -
itzexor created this gist
Oct 9, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ _onScrollEvent(actor, event) { let direction = event.get_scroll_direction(); // Find the current focused window let windows = this.actor.get_parent().get_children() .filter(function(item) { return item.visible; }).map(function(item) { return item._delegate; }); windows = windows.reverse(); let i = windows.length; while (i-- && !windows[i].metaWindow.has_focus()); if (i == -1) return; // v home-made xor if ((direction == 0) != this._applet.reverseScroll) i++; else i--; if (i == windows.length) i = 0; else if (i == -1) i = windows.length - 1; Main.activateWindow(windows[i].metaWindow, global.get_current_time()); }