Skip to content

Commit

Permalink
ScrollCycleWindows: never open new windows.
Browse files Browse the repository at this point in the history
We only activate already open windows, cycling through them, but never
open additional windows.
  • Loading branch information
micheleg committed Mar 25, 2017
1 parent f415fa8 commit a168e2f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions appIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a168e2f

Please sign in to comment.