Column: prevent stacking columns with unshadeable windows

This commit is contained in:
Peter Fajdiga
2023-09-22 11:15:35 +02:00
parent de59979a6e
commit 5ef71c92ce
2 changed files with 11 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ type Tile = any;
interface KwinClient {
// Read-only Properties
readonly shadeable: boolean;
readonly caption: string;
readonly minSize: QSize;
readonly transient: boolean;

View File

@@ -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() &&