remove all uses of window shading

This commit is contained in:
Peter Fajdiga
2025-03-08 16:49:24 +01:00
parent 862cc445bd
commit a0d9c49287
9 changed files with 4 additions and 33 deletions

View File

@@ -51,7 +51,7 @@ Here's the default ones:
| (unassigned) | Move window to the previous position in grid |
| Meta+Shift+Home | Move window to start |
| Meta+Shift+End | Move window to end |
| Meta+X | Toggle stacked layout for focused column (One window in the column visible, others shaded; not supported on Wayland) |
| Meta+X | Toggle stacked layout for focused column (Only the active window visible) |
| Meta+Ctrl+Shift+A | Move column left |
| Meta+Ctrl+Shift+D | Move column right |
| Meta+Ctrl+Shift+Home | Move column to start |

View File

@@ -35,7 +35,7 @@
<string>Stack columns by default</string>
</property>
<property name="toolTip">
<string>New columns start in stacked mode (one window in the column visible, others shaded). Not supported on Wayland.</string>
<string>New columns start in stacked mode (only the active window visible)</string>
</property>
</widget>
</item>

View File

@@ -54,7 +54,6 @@ type Output = { __brand: "Output" };
type KwinClient = {
__brand: "KwinClient";
readonly shadeable: boolean;
readonly caption: string;
readonly minSize: Readonly<QmlSize>;
readonly transient: boolean;
@@ -79,7 +78,6 @@ type KwinClient = {
skipSwitcher: boolean;
keepAbove: boolean;
keepBelow: boolean;
shade: boolean;
minimized: boolean;
frameGeometry: QmlRect;
desktops: KwinDesktop[]; // empty array means all desktops

View File

@@ -106,7 +106,7 @@ function getKeyBindings(world: World, actions: Actions): KeyBinding[] {
{
name: "column-toggle-stacked",
description: "Toggle stacked layout for focused column",
comment: "One window in the column visible, others shaded; not supported on Wayland",
comment: "Only the active window visible",
defaultKeySequence: "Meta+X",
action: () => world.doIfTiledFocused(actions.columnToggleStacked),
},

View File

@@ -221,13 +221,12 @@ class Column {
}
}
if (this.stacked && this.windows.length() >= 2 && this.canStack()) {
if (this.stacked && this.windows.length() >= 2) {
this.arrangeStacked(x);
return;
}
let y = this.grid.desktop.tilingArea.y;
for (const window of this.windows.iterator()) {
window.client.setShade(false);
window.arrange(x, y, this.width, window.height);
y += window.height + this.grid.config.gapsInnerVertical;
}
@@ -255,15 +254,6 @@ 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 onWindowAdded(window: Window, bottom: boolean) {
if (bottom) {
this.windows.insertEnd(window);

View File

@@ -60,10 +60,6 @@ class Window {
}
public focus() {
if (this.client.isShaded()) {
// workaround for KWin deactivating clients when unshading immediately after activation
this.client.setShade(false);
}
this.client.focus();
}

View File

@@ -108,16 +108,6 @@ class ClientWrapper {
});
}
public setShade(shade: boolean) {
this.manipulatingGeometry.do(() => {
this.kwinClient.shade = shade;
});
}
public isShaded() {
return this.kwinClient.shade;
}
public getMaximizedMode() {
return this.maximizedMode;
}

View File

@@ -236,7 +236,6 @@ namespace ClientState {
if (config.offScreenOpacity < 1.0) {
client.kwinClient.opacity = 1.0;
}
client.setShade(false);
client.setFullScreen(false);
if (client.kwinClient.tile === null) {
client.setMaximize(false, false);

View File

@@ -3,7 +3,6 @@ class MockKwinClient {
private static readonly borderThickness = 10;
public readonly shadeable: boolean = false;
public caption = "App";
public minSize: Readonly<QmlSize> = new MockQmlSize(0, 0);
public readonly transient: boolean;
@@ -26,7 +25,6 @@ class MockKwinClient {
public skipSwitcher: boolean = false;
public keepAbove: boolean = false;
public keepBelow: boolean = false;
public shade: boolean = false;
private _minimized: boolean = false;
private _desktops: KwinDesktop[] = [];
private _tile: Tile|null = null;