Bug 512027

Summary: Apply initially window rule not applied on compositor restart
Product: [Plasma] kwin Reporter: Kai Uwe Broulik <kde>
Component: rulesAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: isma.af, kde
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Kai Uwe Broulik 2025-11-13 10:53:30 UTC
SUMMARY
A window rule with "Apply initially" seems to not be applied when KWin is restarted and the app reconnects.

It is applied when the app is started normally

STEPS TO REPRODUCE
1. Set a window rule to put a window on a certain virtual desktop and choose "Apply initially"
2. Start the Qt app and notice how it shows up on the correct desktop
3. Kill kwin and have it restart

OBSERVED RESULT
The window shows on the current virtual desktop

EXPECTED RESULT
The window shows on the virtual desktop that the window rule says it should

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: git master as of 2025-11-13
Qt Version: 6.9.2

ADDITIONAL INFORMATION
Of course only works with Qt apps that can survive a compositor restart. I only tested "virtual desktop" rule.
Comment 1 Kai Uwe Broulik 2025-12-15 17:44:03 UTC
Also affects the "no border" rule, so seems that generally the rules are not evaluated in this case.