From 57d29a77273cd81a213990d4dbb90e062b43c95c Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Thu, 14 Nov 2024 21:48:25 -0800 Subject: [PATCH] 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. --- kwin/scripts/convergentwindows/contents/ui/main.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kwin/scripts/convergentwindows/contents/ui/main.qml b/kwin/scripts/convergentwindows/contents/ui/main.qml index f9e0a128..3eaf2a63 100644 --- a/kwin/scripts/convergentwindows/contents/ui/main.qml +++ b/kwin/scripts/convergentwindows/contents/ui/main.qml @@ -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