Since the update to kwin_wayland 6.3.4, workspace.stackingOrder contains references to windows that have been closed. This breaks some scripts that rely on workspace.stackingOrder for information about window stacking. The issue was discovered using the following script: const windowStack = []; for (let i = 0; i < workspace.stackingOrder.length; i++) { let w = workspace.stackingOrder[i]; if (w.resourceClass == 'plasmashell' || w.resourceClass == 'xwaylandvideobridge' ||) { continue; } windowStack.push(w); } for (let i = 0; i < windowStack.length; i++) { print(windowStack[i].resourceClass); } Viewing the output of the script using journalctl (journalctl -f QT_CATEGORY=js QT_CATEGORY=kwin_scripting), I can see that there are some references to windows that have since been closed. SYSTEM INFORMATION Operating System: openSUSE Tumbleweed 20250411 KDE Plasma Version: 6.3.4 KDE Frameworks Version: 6.12.0 Qt Version: 6.9.0 Kernel Version: 6.12.22-1-longterm (64-bit) Graphics Platform: Wayland
Sorry for the typo in the script, this is the version that works: const windowStack = []; for (let i = 0; i < workspace.stackingOrder.length; i++) { let w = workspace.stackingOrder[i]; if (w.resourceClass == 'plasmashell' || w.resourceClass == 'xwaylandvideobridge') { continue; } windowStack.push(w); } for (let i = 0; i < windowStack.length; i++) { print(windowStack[i].resourceClass); }