From a168e2f513fb8a9821f6daa996d80e5f51ac24de Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 24 Mar 2017 23:51:14 +0000 Subject: [PATCH] ScrollCycleWindows: never open new windows. We only activate already open windows, cycling through them, but never open additional windows. --- appIcons.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/appIcons.js b/appIcons.js index b1c71941c..5264b9599 100644 --- a/appIcons.js +++ b/appIcons.js @@ -140,6 +140,16 @@ const MyAppIcon = new Lang.Class({ }, onScrollEvent: function(actor, event) { + + // We only activate windows of running applications, i.e. we never open new windows + // We check if the app is running, and that the # of windows is > 0 in + // case we use workspace isolation, + let appIsRunning = this.app.state == Shell.AppState.RUNNING + && getInterestingWindows(this.app, this._dtdSettings).length > 0; + + if (!appIsRunning) + return false + if (this._optionalScrollCycleWindowsDeadTimeId > 0) return false; else