Column: prevent stacking columns with unshadeable windows
This commit is contained in:
1
src/extern/kwin.d.ts
vendored
1
src/extern/kwin.d.ts
vendored
@@ -34,6 +34,7 @@ type Tile = any;
|
||||
|
||||
interface KwinClient {
|
||||
// Read-only Properties
|
||||
readonly shadeable: boolean;
|
||||
readonly caption: string;
|
||||
readonly minSize: QSize;
|
||||
readonly transient: boolean;
|
||||
|
||||
@@ -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() &&
|
||||
|
||||
Reference in New Issue
Block a user