diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-03-02 02:13:31 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-03-02 02:13:37 +0000 |
| commit | 2c78867a98ceda853df91517535fad993e6f9435 (patch) | |
| tree | 2cf106803e13ff052a1e5c87a6c9ccaf7978372c /src/desktop/WindowRule.cpp | |
| parent | 2acbb59bf218331a090f402982f22fd7f85ae50f (diff) | |
core: cleanup window properties
they don't need to be in CConfigManager, and belong to window instead
Diffstat (limited to 'src/desktop/WindowRule.cpp')
| -rw-r--r-- | src/desktop/WindowRule.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<std::string>{ 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<std::string*>(&szRule) = "prop " + rule; ruleType = RULE_PROP; Debug::log(LOG, "CWindowRule: direct prop rule found, rewritten {} -> {}", rule, szRule); |
