Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5004417285 | ||
|
|
a110aee7ce | ||
|
|
817ea64171 |
@@ -9,7 +9,7 @@
|
|||||||
}],
|
}],
|
||||||
"Id": "karousel",
|
"Id": "karousel",
|
||||||
"ServiceTypes": ["KWin/Script"],
|
"ServiceTypes": ["KWin/Script"],
|
||||||
"Version": "0.7.1",
|
"Version": "0.7.2",
|
||||||
"License": "GPLv3",
|
"License": "GPLv3",
|
||||||
"Website": "https://github.com/peterfajdiga/karousel",
|
"Website": "https://github.com/peterfajdiga/karousel",
|
||||||
"BugReportUrl": "https://github.com/peterfajdiga/karousel/issues"
|
"BugReportUrl": "https://github.com/peterfajdiga/karousel/issues"
|
||||||
|
|||||||
@@ -33,13 +33,14 @@ class ClientWrapper {
|
|||||||
// window is being manually resized, prevent fighting with the user
|
// window is being manually resized, prevent fighting with the user
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.lastPlacement = Qt.rect(x, y, width, height);
|
const clientWrapper = this; // workaround for bug in Qt5's JS engine
|
||||||
this.kwinClient.frameGeometry = this.lastPlacement;
|
clientWrapper.lastPlacement = Qt.rect(x, y, width, height);
|
||||||
if (this.kwinClient.frameGeometry !== this.lastPlacement) {
|
clientWrapper.kwinClient.frameGeometry = clientWrapper.lastPlacement;
|
||||||
|
if (clientWrapper.kwinClient.frameGeometry !== clientWrapper.lastPlacement) {
|
||||||
// frameGeometry assignment failed. This sometimes happens on Wayland
|
// frameGeometry assignment failed. This sometimes happens on Wayland
|
||||||
// when a window is off-screen, effectively making it stuck there.
|
// when a window is off-screen, effectively making it stuck there.
|
||||||
this.kwinClient.frameGeometry.x = x; // This makes it unstuck.
|
clientWrapper.kwinClient.frameGeometry.x = x; // This makes it unstuck.
|
||||||
this.kwinClient.frameGeometry = this.lastPlacement;
|
clientWrapper.kwinClient.frameGeometry = clientWrapper.lastPlacement;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class DesktopManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getDesktopForClient(kwinClient: KwinClient) {
|
public getDesktopForClient(kwinClient: KwinClient) {
|
||||||
if (kwinClient.activities.length !== 1 && kwinClient.desktop === 0) {
|
if (kwinClient.activities.length !== 1 || kwinClient.desktop <= 0) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
return this.getDesktop(kwinClient.activities[0], kwinClient.desktop);
|
return this.getDesktop(kwinClient.activities[0], kwinClient.desktop);
|
||||||
|
|||||||
Reference in New Issue
Block a user