Diffusion KWin 9a02ed4d360f

Do not save kwinrulesrc on every window opening/closing

Authored by graesslin on May 7 2018, 7:59 PM.

Description

Do not save kwinrulesrc on every window opening/closing

Summary:
Our rule handling has had a grave error for years. Whenever a window
with a rule was openend or closed the kwinrulesrc was written back to
disk.

The reason for this behavior is that temporary rules need to be discarded
once they were used. For that there is a method discardUsed which invokes
requestDiskStorage whenever a rule for the window was found. But it did
not check whether there was a rule requiring this.

This change modifies the discardUsed to track whether it changed a rule
and only writes back in case there was a change.

BUG: 393911
FIXED-IN: 5.12.6

Test Plan: Only compile tested

Reviewers: KWin, Plasma

Subscribers: kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D12749