ClientWrapper: create a workaround for the problem with stuck off-screen windows on Wayland

This commit is contained in:
Peter Fajdiga
2024-03-17 18:35:47 +01:00
parent b984f025ec
commit 489a1447e7

View File

@@ -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;
}
});
}