summaryrefslogtreecommitdiff
path: root/src/desktop/LayerRule.cpp
diff options
context:
space:
mode:
authordavc0n <dconti.dev@gmail.com>2025-04-24 20:49:49 +0200
committerGitHub <noreply@github.com>2025-04-24 20:49:49 +0200
commit0e80ecc5342db04c8c1f807fa6db4c703fb89e3a (patch)
treed71179a6517216ab32a12ebaf147e9eaffdbdffa /src/desktop/LayerRule.cpp
parentbe6268a7ecea2ad50cdb78fb661884811a8a28e8 (diff)
layers: refactor class member vars (#10149)
* layers: refactor class member vars * popups: rename m_WLSurface to m_wlSurface
Diffstat (limited to 'src/desktop/LayerRule.cpp')
-rw-r--r--src/desktop/LayerRule.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/desktop/LayerRule.cpp b/src/desktop/LayerRule.cpp
index 791a557e..c03d8968 100644
--- a/src/desktop/LayerRule.cpp
+++ b/src/desktop/LayerRule.cpp
@@ -7,32 +7,32 @@
static const auto RULES = std::unordered_set<std::string>{"noanim", "blur", "blurpopups", "dimaround"};
static const auto RULES_PREFIX = std::unordered_set<std::string>{"ignorealpha", "ignorezero", "xray", "animation", "order"};
-CLayerRule::CLayerRule(const std::string& rule_, const std::string& ns_) : targetNamespace(ns_), rule(rule_) {
- const bool VALID = RULES.contains(rule) || std::any_of(RULES_PREFIX.begin(), RULES_PREFIX.end(), [&rule_](const auto& prefix) { return rule_.starts_with(prefix); });
+CLayerRule::CLayerRule(const std::string& rule_, const std::string& ns_) : m_targetNamespace(ns_), m_rule(rule_) {
+ const bool VALID = RULES.contains(m_rule) || std::any_of(RULES_PREFIX.begin(), RULES_PREFIX.end(), [&rule_](const auto& prefix) { return rule_.starts_with(prefix); });
if (!VALID)
return;
- if (rule == "noanim")
- ruleType = RULE_NOANIM;
- else if (rule == "blur")
- ruleType = RULE_BLUR;
- else if (rule == "blurpopups")
- ruleType = RULE_BLURPOPUPS;
- else if (rule == "dimaround")
- ruleType = RULE_DIMAROUND;
- else if (rule.starts_with("ignorealpha"))
- ruleType = RULE_IGNOREALPHA;
- else if (rule.starts_with("ignorezero"))
- ruleType = RULE_IGNOREZERO;
- else if (rule.starts_with("xray"))
- ruleType = RULE_XRAY;
- else if (rule.starts_with("animation"))
- ruleType = RULE_ANIMATION;
- else if (rule.starts_with("order"))
- ruleType = RULE_ORDER;
+ if (m_rule == "noanim")
+ m_ruleType = RULE_NOANIM;
+ else if (m_rule == "blur")
+ m_ruleType = RULE_BLUR;
+ else if (m_rule == "blurpopups")
+ m_ruleType = RULE_BLURPOPUPS;
+ else if (m_rule == "dimaround")
+ m_ruleType = RULE_DIMAROUND;
+ else if (m_rule.starts_with("ignorealpha"))
+ m_ruleType = RULE_IGNOREALPHA;
+ else if (m_rule.starts_with("ignorezero"))
+ m_ruleType = RULE_IGNOREZERO;
+ else if (m_rule.starts_with("xray"))
+ m_ruleType = RULE_XRAY;
+ else if (m_rule.starts_with("animation"))
+ m_ruleType = RULE_ANIMATION;
+ else if (m_rule.starts_with("order"))
+ m_ruleType = RULE_ORDER;
else {
Debug::log(ERR, "CLayerRule: didn't match a rule that was found valid?!");
- ruleType = RULE_INVALID;
+ m_ruleType = RULE_INVALID;
}
} \ No newline at end of file