Skip to content

Commit

Permalink
Ignore windows that are not put on the pager
Browse files Browse the repository at this point in the history
Previously, windows such as the start menu and calendar were treated as
normal windows. As a result, opening the start menu on a desktop edge
would cause a weird desktop animation and sometimes crash kwin.

Now, any window that does not want to be part of the pager is ignored
when deciding if a new desktop should be created on either end.
  • Loading branch information
jhgarner committed Feb 23, 2018
1 parent 72bb676 commit 5608feb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contents/code/main.js
@@ -1,11 +1,11 @@
var LOCK = false;

function desktops() {
return workspace.clientList().reduce(function(n, w) { return Math.max(n, w.desktop); }, -1);
return workspace.clientList().reduce(function(n, w) { return Math.max(n, w.skipPager ? -1 : w.desktop); }, -1);
}

function winsInDesktop(d) {
return workspace.clientList().filter(function(w) { return w.desktop == d; });
return workspace.clientList().filter(function(w) { return w.desktop == d && !w.skipPager; });
}

function winsFromDesktop(d) {
Expand Down

0 comments on commit 5608feb

Please sign in to comment.