From 2c78867a98ceda853df91517535fad993e6f9435 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 2 Mar 2025 02:13:31 +0000 Subject: core: cleanup window properties they don't need to be in CConfigManager, and belong to window instead --- src/desktop/WindowRule.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/desktop/WindowRule.cpp') diff --git a/src/desktop/WindowRule.cpp b/src/desktop/WindowRule.cpp index fea2d43b..cf3004b0 100644 --- a/src/desktop/WindowRule.cpp +++ b/src/desktop/WindowRule.cpp @@ -16,9 +16,9 @@ static const auto RULES_PREFIX = std::unordered_set{ CWindowRule::CWindowRule(const std::string& rule, const std::string& value, bool isV2, bool isExecRule) : szValue(value), szRule(rule), v2(isV2), execRule(isExecRule) { const auto VALS = CVarList(rule, 2, ' '); const bool VALID = RULES.contains(rule) || std::any_of(RULES_PREFIX.begin(), RULES_PREFIX.end(), [&rule](auto prefix) { return rule.starts_with(prefix); }) || - (g_pConfigManager->mbWindowProperties.find(VALS[0]) != g_pConfigManager->mbWindowProperties.end()) || - (g_pConfigManager->miWindowProperties.find(VALS[0]) != g_pConfigManager->miWindowProperties.end()) || - (g_pConfigManager->mfWindowProperties.find(VALS[0]) != g_pConfigManager->mfWindowProperties.end()); + (NWindowProperties::boolWindowProperties.find(VALS[0]) != NWindowProperties::boolWindowProperties.end()) || + (NWindowProperties::intWindowProperties.find(VALS[0]) != NWindowProperties::intWindowProperties.end()) || + (NWindowProperties::floatWindowProperties.find(VALS[0]) != NWindowProperties::floatWindowProperties.end()); if (!VALID) return; @@ -80,9 +80,9 @@ CWindowRule::CWindowRule(const std::string& rule, const std::string& value, bool else { // check if this is a prop. const CVarList VARS(rule, 0, 's', true); - if (g_pConfigManager->miWindowProperties.find(VARS[0]) != g_pConfigManager->miWindowProperties.end() || - g_pConfigManager->mbWindowProperties.find(VARS[0]) != g_pConfigManager->mbWindowProperties.end() || - g_pConfigManager->mfWindowProperties.find(VARS[0]) != g_pConfigManager->mfWindowProperties.end()) { + if (NWindowProperties::intWindowProperties.find(VARS[0]) != NWindowProperties::intWindowProperties.end() || + NWindowProperties::boolWindowProperties.find(VARS[0]) != NWindowProperties::boolWindowProperties.end() || + NWindowProperties::floatWindowProperties.find(VARS[0]) != NWindowProperties::floatWindowProperties.end()) { *const_cast(&szRule) = "prop " + rule; ruleType = RULE_PROP; Debug::log(LOG, "CWindowRule: direct prop rule found, rewritten {} -> {}", rule, szRule); -- cgit v1.2.3