MockWorkspace.removeWindow: Randomize the order of signals

This commit is contained in:
Peter Fajdiga
2025-11-26 23:54:12 +01:00
parent 2c433867f3
commit 1c89391739

View File

@@ -54,12 +54,14 @@ class MockWorkspace {
public removeWindow(window: MockKwinClient) {
this.activeWindow = null;
runReorder(
() => {
if (this.activeWindow === null) {
activateRandomWindowOnDesktop(this.currentDesktop);
};
},
() => this.windows.splice(this.windows.indexOf(window), 1),
() => this.windowRemoved.fire(window),
);
if (this.activeWindow === null) {
activateRandomWindowOnDesktop(this.currentDesktop);
};
}
public moveWindow(window: MockKwinClient, ...deltas: QmlPoint[]) {