summaryrefslogtreecommitdiff
path: root/src/desktop/rule/windowRule/WindowRuleApplicator.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-01-01 21:49:57 +0100
committerGitHub <noreply@github.com>2026-01-01 21:49:57 +0100
commit31d3181e1ee91e338fb4fb8207d64b8d689310fc (patch)
tree71b00156665fe38d755f130712156e5537220ee5 /src/desktop/rule/windowRule/WindowRuleApplicator.cpp
parent9b93d621b1019e8378b8a902edb7ba8dd8baf204 (diff)
dekstop/window: read static rules before guessing initial size if possible (#12783)
Diffstat (limited to 'src/desktop/rule/windowRule/WindowRuleApplicator.cpp')
-rw-r--r--src/desktop/rule/windowRule/WindowRuleApplicator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/desktop/rule/windowRule/WindowRuleApplicator.cpp b/src/desktop/rule/windowRule/WindowRuleApplicator.cpp
index 0b6cba0f..cb3a6f67 100644
--- a/src/desktop/rule/windowRule/WindowRuleApplicator.cpp
+++ b/src/desktop/rule/windowRule/WindowRuleApplicator.cpp
@@ -537,7 +537,7 @@ CWindowRuleApplicator::SRuleResult CWindowRuleApplicator::applyStaticRule(const
return SRuleResult{};
}
-void CWindowRuleApplicator::readStaticRules() {
+void CWindowRuleApplicator::readStaticRules(bool preRead) {
if (!m_window)
return;
@@ -592,7 +592,8 @@ void CWindowRuleApplicator::readStaticRules() {
for (const auto& wr : execRules) {
applyStaticRule(wr);
applyDynamicRule(wr);
- ruleEngine()->unregisterRule(wr);
+ if (!preRead)
+ ruleEngine()->unregisterRule(wr);
}
}