diff --git a/src/lib/world/Clients.ts b/src/lib/world/Clients.ts index 58a45fa..230a029 100644 --- a/src/lib/world/Clients.ts +++ b/src/lib/world/Clients.ts @@ -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) { diff --git a/src/tests/utils/mocks/MockKwinClient.ts b/src/tests/utils/mocks/MockKwinClient.ts index 6aeb50a..15e8f4d 100644 --- a/src/tests/utils/mocks/MockKwinClient.ts +++ b/src/tests/utils/mocks/MockKwinClient.ts @@ -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 + ); } }