fix detection of full-screen windows for apps that manage their own window decorations

This commit is contained in:
Peter Fajdiga
2025-09-06 22:02:14 +02:00
parent 75384d9fb4
commit 1b592c5b4b
2 changed files with 11 additions and 3 deletions

View File

@@ -47,8 +47,8 @@ namespace Clients {
export function isFullScreenGeometry(kwinClient: KwinClient) {
const fullScreenArea = Workspace.clientArea(ClientAreaOption.FullScreenArea, kwinClient.output, getKwinDesktopApprox(kwinClient));
return kwinClient.clientGeometry.width === fullScreenArea.width &&
kwinClient.clientGeometry.height === fullScreenArea.height;
return kwinClient.clientGeometry.width >= fullScreenArea.width &&
kwinClient.clientGeometry.height >= fullScreenArea.height;
}
export function isOnVirtualDesktop(kwinClient: KwinClient, kwinDesktop: KwinDesktop) {

View File

@@ -88,7 +88,15 @@ class MockKwinClient {
this.frameGeometry.height - 2 * MockKwinClient.borderThickness,
);
} else {
return this.frameGeometry;
return runOneOf(
() => this.frameGeometry,
() => new MockQmlRect(
this.frameGeometry.x - 20,
this.frameGeometry.y - 20,
this.frameGeometry.width + 40,
this.frameGeometry.height + 40,
), // some full-screen windows that manage their own window decorations can temporarily have a client geometry bigger than the screen
);
}
}