--- appIcons.js 2018-02-27 14:14:00.000000000 +0000
+++ appIcons_new.js 2018-03-15 04:38:25.528002000 +0000
@@ -191,11 +191,61 @@
this.forcedOverview = false;
+ this._dtpSettings.connect('changed::scroll-action', Lang.bind(this, function() {
+ this._optionalScrollCycleWindows();
+ }));
+ this._optionalScrollCycleWindows();
+
this._numberOverlay();
this._signalsHandler = new Convenience.GlobalSignalsHandler();
},
+ _optionalScrollCycleWindows: function() {
+
+ if (this._scrollEventHandler) {
+ this.actor.disconnect(this._scrollEventHandler);
+ this._scrollEventHandler = 0;
+ }
+ this._scrollEventHandler = this.actor.connect('scroll-event', Lang.bind(this,
+ this.onScrollEvent));
+ },
+
+ onScrollEvent: function(actor, event) {
+
+ let focusedApp = tracker.focus_app;
+
+ let direction = null;
+
+ switch (event.get_scroll_direction()) {
+ case Clutter.ScrollDirection.UP:
+ direction = Meta.MotionDirection.UP;
+ break;
+ case Clutter.ScrollDirection.DOWN:
+ direction = Meta.MotionDirection.DOWN;
+ break;
+ case Clutter.ScrollDirection.SMOOTH:
+ let [dx, dy] = event.get_scroll_delta();
+ if (dy < 0)
+ direction = Meta.MotionDirection.UP;
+ else if (dy > 0)
+ direction = Meta.MotionDirection.DOWN;
+ break;
+ }
+
+ if (!Main.overview._shown) {
+ let reversed = direction === Meta.MotionDirection.UP;
+ if (this.app == focusedApp)
+ cycleThroughWindows(this.app, this._dtpSettings, reversed, true);
+ else {
+ activateFirstWindow(this.app, this._dtpSettings);
+ }
+ }
+ else
+ this.app.activate();
+ return true;
+ },
+
_createWindowPreview: function() {
// Abort if already activated
if (this.menuManagerWindowPreview)
@@ -1106,10 +1156,10 @@
recentlyClickedAppIndex++;
}
let index = recentlyClickedAppIndex % recentlyClickedAppWindows.length;
-
- if(recentlyClickedAppWindows[index] === "MINIMIZE")
+ //The commented code give errors in windows viewing order but without it we get a non-blocking error.
+ /*if(recentlyClickedAppWindows[index] === "MINIMIZE")
minimizeWindow(app, true, settings);
- else
+ else*/
Main.activateWindow(recentlyClickedAppWindows[index]);
}