summaryrefslogtreecommitdiff
path: root/src/desktop/Window.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-03-02 02:13:31 +0000
committerVaxry <vaxry@vaxry.net>2025-03-02 02:13:37 +0000
commit2c78867a98ceda853df91517535fad993e6f9435 (patch)
tree2cf106803e13ff052a1e5c87a6c9ccaf7978372c /src/desktop/Window.cpp
parent2acbb59bf218331a090f402982f22fd7f85ae50f (diff)
core: cleanup window properties
they don't need to be in CConfigManager, and belong to window instead
Diffstat (limited to 'src/desktop/Window.cpp')
-rw-r--r--src/desktop/Window.cpp12
1 files changed, 6 insertions, 6 deletions
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<CWindowRule>& 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);
}
}