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/Window.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/desktop/Window.cpp') diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 6404c385..10f8bd43 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -777,15 +777,15 @@ void CWindow::applyDynamicRule(const SP& r) { } case CWindowRule::RULE_PROP: { const CVarList VARS(r->szRule, 0, ' '); - if (auto search = g_pConfigManager->miWindowProperties.find(VARS[1]); search != g_pConfigManager->miWindowProperties.end()) { + if (auto search = NWindowProperties::intWindowProperties.find(VARS[1]); search != NWindowProperties::intWindowProperties.end()) { try { *(search->second(m_pSelf.lock())) = CWindowOverridableVar(std::stoi(VARS[2]), priority); } catch (std::exception& e) { Debug::log(ERR, "Rule \"{}\" failed with: {}", r->szRule, e.what()); } - } else if (auto search = g_pConfigManager->mfWindowProperties.find(VARS[1]); search != g_pConfigManager->mfWindowProperties.end()) { + } else if (auto search = NWindowProperties::floatWindowProperties.find(VARS[1]); search != NWindowProperties::floatWindowProperties.end()) { try { *(search->second(m_pSelf.lock())) = CWindowOverridableVar(std::stof(VARS[2]), priority); } catch (std::exception& e) { Debug::log(ERR, "Rule \"{}\" failed with: {}", r->szRule, e.what()); } - } else if (auto search = g_pConfigManager->mbWindowProperties.find(VARS[1]); search != g_pConfigManager->mbWindowProperties.end()) { + } else if (auto search = NWindowProperties::boolWindowProperties.find(VARS[1]); search != NWindowProperties::boolWindowProperties.end()) { try { *(search->second(m_pSelf.lock())) = CWindowOverridableVar(VARS[2].empty() ? true : (bool)std::stoi(VARS[2]), priority); } catch (std::exception& e) { Debug::log(ERR, "Rule \"{}\" failed with: {}", r->szRule, e.what()); } @@ -1653,13 +1653,13 @@ PHLWINDOW CWindow::getSwallower() { } void CWindow::unsetWindowData(eOverridePriority priority) { - for (auto const& element : g_pConfigManager->mbWindowProperties) { + for (auto const& element : NWindowProperties::boolWindowProperties) { element.second(m_pSelf.lock())->unset(priority); } - for (auto const& element : g_pConfigManager->miWindowProperties) { + for (auto const& element : NWindowProperties::intWindowProperties) { element.second(m_pSelf.lock())->unset(priority); } - for (auto const& element : g_pConfigManager->mfWindowProperties) { + for (auto const& element : NWindowProperties::floatWindowProperties) { element.second(m_pSelf.lock())->unset(priority); } } -- cgit v1.2.3