diff --git a/src/extern/kwin.d.ts b/src/extern/kwin.d.ts index 26f096c..76df038 100644 --- a/src/extern/kwin.d.ts +++ b/src/extern/kwin.d.ts @@ -34,6 +34,7 @@ type Tile = any; interface KwinClient { // Read-only Properties + readonly shadeable: boolean; readonly caption: string; readonly minSize: QSize; readonly transient: boolean; diff --git a/src/layout/Column.ts b/src/layout/Column.ts index 379cf1b..c0dca74 100644 --- a/src/layout/Column.ts +++ b/src/layout/Column.ts @@ -181,7 +181,7 @@ class Column { } public arrange(x: number) { - if (this.stacked && this.windows.length() >= 2) { + if (this.stacked && this.windows.length() >= 2 && this.canStack()) { this.arrangeStacked(x); return; } @@ -228,6 +228,15 @@ class Column { this.grid.desktop.onLayoutChanged(); } + private canStack() { + for (const window of this.windows.iterator()) { + if (!window.client.kwinClient.shadeable) { + return false; + } + } + return true; + } + public isVisible(scrollPos: Desktop.ScrollPos, fullyVisible: boolean) { if (fullyVisible) { return this.getLeft() >= scrollPos.getLeft() &&