| Summary: | Temporary rules are not deleted from the config file | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | r1ntse.a |
| Component: | rules | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | isma.af, ivnitsky.a |
| Priority: | NOR | ||
| Version First Reported In: | 5.23.3 | ||
| Target Milestone: | --- | ||
| Platform: | Neon | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/d2d92cdfd2c1869942cf119b2b8f680750fa7e96 | Version Fixed/Implemented In: | 6.1 |
| Sentry Crash Report: | |||
|
Description
r1ntse.a
2021-12-02 16:41:58 UTC
It seems you set the rule to "Force temporarily" (blockcompositingrule=6) By design this setting forces the rule while the window is active and then deletes it, since it's a temporary setting If you'd like to have it permanently please set it to "Force" instead. There's a bug though, and it's that it keeps it on the kwinrulesrc file. (In reply to Ismael Asensio from comment #1) > It seems you set the rule to "Force temporarily" (blockcompositingrule=6) > > By design this setting forces the rule while the window is active and then > deletes it, since it's a temporary setting > If you'd like to have it permanently please set it to "Force" instead. > > There's a bug though, and it's that it keeps it on the kwinrulesrc file. I completely misunderstood what "temporarily" indicates in that case. Sorry for the report. (In reply to r1ntse.a from comment #2) > (In reply to Ismael Asensio from comment #1) > > It seems you set the rule to "Force temporarily" (blockcompositingrule=6) > > > > By design this setting forces the rule while the window is active and then > > deletes it, since it's a temporary setting > > If you'd like to have it permanently please set it to "Force" instead. > > > > There's a bug though, and it's that it keeps it on the kwinrulesrc file. > > I completely misunderstood what "temporarily" indicates in that case. Sorry > for the report. Don't be. It was a very good and thorough report, with all the information required to figure it out. And it exposed something that it isn't working right, so thanks a lot for your time on it! If you don't mind, I'll change the title of the bug to track that temporary rules are not deleted from the config file. Can confirm this in Plasma 5.24. Rules with "apply now" are not deleted from config file and not displayed in "Windows rules" Git commit d2d92cdfd2c1869942cf119b2b8f680750fa7e96 by Ismael Asensio. Committed on 13/05/2024 at 18:18. Pushed by iasensio into branch 'master'. rules/RuleBook: Optimize saving discarded rules to config After porting to KConfigXT settings some time ago, there was still an inefficient and error-prone codepath between the `RuleBook` (which keeps the runtime list of `Rules`) and the `RuleBookSettings` (responsible for config reads and saves), in the form of the `setRules()` method. We can eliminate the `setRules()` codepath, reducing unnecessary runtime process and file access operations, and instead: - Keep track of the config `id` in the `Rules` objects - Keep a single `RuleBookSettings` object as a member - Modify or delete the discarded rules settings directly - Save when necessary This also fixes two bugs/pitfalls of the previous solution: - the config group id for each rule is now preserved instead of creating new ones - no leftovers on the config file for the discarded groups and entries Setting custom configs for the integration tests still works unchanged. FIXED-IN: 6.1 M +12 -44 src/rulebooksettings.cpp M +2 -4 src/rulebooksettings.h M +29 -13 src/rules.cpp M +6 -6 src/rules.h https://invent.kde.org/plasma/kwin/-/commit/d2d92cdfd2c1869942cf119b2b8f680750fa7e96 |