fix detection of full-screen windows for apps that manage their own window decorations
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user