Bug 506186

Summary: "No title bar and frame" kwin rules disappear and have no effect when option "Apply Now" is selected
Product: [Plasma] kwin Reporter: migtex <migtex2>
Component: rulesAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: isma.af, kdedev, nate
Priority: NOR    
Version First Reported In: 6.3.5   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: "Force" option is applied and persisted successfully in 6.4, unlike "Apply Now"
The flow on 6.3 does not even apply the rule
Tries to apply theme color change

Description migtex 2025-06-25 22:31:21 UTC
Created attachment 182667 [details]
"Force" option is applied and persisted successfully in 6.4, unlike "Apply Now"

***
I am sure this is a bug, i have asked other people here https://discuss.kde.org/t/no-titlebar-and-frame-rules/36115/8

SUMMARY
In Debian 13, Kde 6.3.5 and 6.5, applying the rule does nothing and disappears


STEPS TO REPRODUCE
1.Windows rules -> Add new -> Unimportant/Match Whole Class / with property "No title bar and frame": True -> Apply Now 
2. Switch to another tab
3. Switch back to window rules
OBSERVED RESULT
The rule disappears and does apply the effect

EXPECTED RESULT
Rule to persist, 
Rule is applied,
 

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 13
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.12.32-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6800

And also With /kde/usr/bin/plasmashell --replace
Operating System: Debian GNU/Linux 13
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.12.32-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 32 GiB of RAM (31.3 GiB usable)
Graphics Processor: AMD Radeon RX 6800

ADDITIONAL INFORMATION
In KDE Plasma Version: 6.3.5, the "Force" option has the same behavior. I was not able to replicate it in 6.4.80, as you can see the rule remains and is applied.
Comment 1 migtex 2025-06-25 22:32:18 UTC
Created attachment 182668 [details]
The flow on 6.3 does not even apply the rule
Comment 2 migtex 2025-06-25 22:33:55 UTC
Thanks for all the work. If I can help, let me know
Comment 3 TraceyC 2025-06-27 17:14:21 UTC
Can confirm this behavior on Plasma built from git-master
Comment 4 Ismael Asensio 2025-06-27 19:34:34 UTC
I'll try and dissect this bug report in two parts

- About the "Apply Now" policy: 

It is expected that the rule disappears when it is set to "Apply Now", because it is a one-time-only setting. The same thing happens for "Force Temporarily". 
I understand this can be unexpected so we may work on disabling them (not as obvious as it seems), but it would be a feature request.

- On the rule not applying just for this case, that might be a case of being set to apply to all windows (which is generally disallowed), but getting deleted after the first shot. 
Can you check if this happens for other properties (ej. titlebar color, which is easy to test) also on "Apply Now"? This will help to better track the cause.

Also note there are better ways to not draw window titles than using window rules ;) but a bit hidden: 
Go to System Settings > Window Decorations. Over the Breeze decoration, click the "edit" pen button, then go to "Window-Specific Overrides" and add a new exception. There you can also match some windows and set "Hide Titlebar"
Comment 5 migtex 2025-06-28 21:38:40 UTC
Created attachment 182769 [details]
Tries to apply theme color change
Comment 6 migtex 2025-06-28 21:50:19 UTC
(In reply to Ismael Asensio from comment #4)

Hello, thanks for the consideration

> It is expected that the rule disappears when it is set to "Apply Now",
> because it is a one-time-only setting. The same thing happens for "Force
> Temporarily". 
Yes, sorry in the KDE discuss thread Claydoh pointed it out. I didn't notice 

> I understand this can be unexpected so we may work on disabling them (not as
> obvious as it seems), but it would be a feature request.
Do I have your blessing to make it?

> Can you check if this happens for other properties (ej. titlebar color,
> which is easy to test) also on "Apply Now"? This will help to better track
> the cause.
Of course. I have added a new attachment "https://bugs.kde.org/attachment.cgi?id=182769" to the convo.
Curiously, only the "Force", "Force Temporarily" and "Do not apply" options are available for the changing color title property.
I have set my global theme to breeze dark. There are no other rules being applied. Trying either Force option did not successfully apply the theme changes to Breeze Light :(

> Also note there are better ways to not draw window titles than using window
> rules ;) but a bit hidden: 
> Go to System Settings > Window Decorations. Over the Breeze decoration,
> click the "edit" pen button, then go to "Window-Specific Overrides" and add
> a new exception. There you can also match some windows and set "Hide
> Titlebar"

Very cool. Gonna check it out further. I am trying to set these settings by ansible. These window decoration rule should also be in .config/kwinrc right?