From 489a1447e7cf1733d23daef16ea630dbd014864b Mon Sep 17 00:00:00 2001 From: Peter Fajdiga Date: Sun, 17 Mar 2024 18:35:47 +0100 Subject: [PATCH] ClientWrapper: create a workaround for the problem with stuck off-screen windows on Wayland --- src/world/ClientWrapper.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/world/ClientWrapper.ts b/src/world/ClientWrapper.ts index f0b68ee..9c2d4c6 100644 --- a/src/world/ClientWrapper.ts +++ b/src/world/ClientWrapper.ts @@ -35,6 +35,12 @@ class ClientWrapper { } this.lastPlacement = Qt.rect(x, y, width, height); this.kwinClient.frameGeometry = this.lastPlacement; + if (this.kwinClient.frameGeometry !== this.lastPlacement) { + // frameGeometry assignment failed. This sometimes happens on Wayland + // when a window is off-screen, effectively making it stuck there. + this.kwinClient.frameGeometry.x = x; // This makes it unstuck. + this.kwinClient.frameGeometry = this.lastPlacement; + } }); }