kwin/convergentwindows: Ignore case with undefined desktop

Otherwise the script keeps complaining in logs, if the window doesn't
have a desktop we should ignore it.
This commit is contained in:
Devin Lin 2024-11-14 21:48:25 -08:00
parent 4569296128
commit 57d29a7727

View file

@ -28,6 +28,9 @@ Loader {
if (!window.fullScreen) {
const output = window.output;
const desktop = window.desktops[0]; // assume it's the first desktop that the window is on
if (desktop === undefined) {
return;
}
const maximizeRect = KWinComponents.Workspace.clientArea(KWinComponents.Workspace.MaximizeArea, output, desktop);
// set the window to the maximized size and position instantly, avoiding race condition