https://bugs.kde.org/show_bug.cgi?id=526933

            Bug ID: 526933
           Summary: Window rules set to "Remember" never save the
                    remembered value to kwinrulesrc, so it is lost after a
                    restart
    Classification: Plasma
           Product: kwin
      Version First 6.7.5
       Reported In:
          Platform: openSUSE
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: rules
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

STEPS TO REPRODUCE
1. Create a window rule for an application with Position set to "Remember"
(e.g. initial value 100,100).
2. Open the application and move its window somewhere else.
3. Close the window. Reopening it in the same session puts it where it was left
(correct).
4. Log out and back in (or restart KWin), then open the application.

OBSERVED RESULT
The window opens at the rule's original position (100,100).
~/.config/kwinrulesrc still holds the original value and its modification time
does not change when the window is moved and closed.

EXPECTED RESULT
The last position is written to kwinrulesrc and used after a restart, as before
Plasma 6.1.

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed, kernel 7.2.9
KDE Plasma: 6.7.5 (Wayland)
KDE Frameworks: 6.30.0
Qt: 6.11.2

ADDITIONAL INFORMATION
Rules::update() stores the remembered value only in the in-memory Rules object,
then WindowRules::update() calls RuleBook::requestDiskStorage(). Since commit
d2d92cdf ("rules/RuleBook: Optimize saving discarded rules to config", 6.1),
RuleBook::save() only calls m_book->save(), and nothing copies the updated
Rules back into their RuleSettings, so there is nothing to write.
RuleBook::discardUsed() does copy (Rules::write) but only for rules it
discards. The same applies to every Remember property (size, desktops, etc.).

The existing testPositionRemember integration test passes because it only
reopens the window in the same session; it never reloads the rules from the
config.

Not the same as bug 518923 (wrong position after restoring from maximized,
in-session). A fix with a regression test is being prepared as a merge request.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to