summaryrefslogtreecommitdiff
path: root/src/desktop
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-11-20 10:32:50 +0000
committerVaxry <vaxry@vaxry.net>2024-11-20 10:32:50 +0000
commite5fa017172156fa5c70fedeaee5f51eace9577c0 (patch)
tree19a59d9b02f6c50a78446c9c3cb28a4ec464dd26 /src/desktop
parentc4eda46d0ef022a17348623beec4154ba34af691 (diff)
internal: fix some misused configStringToInt conversions
fixes #8523
Diffstat (limited to 'src/desktop')
-rw-r--r--src/desktop/Window.cpp2
-rw-r--r--src/desktop/Workspace.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp
index 33e6a5f8..117d301c 100644
--- a/src/desktop/Window.cpp
+++ b/src/desktop/Window.cpp
@@ -707,7 +707,7 @@ void CWindow::applyDynamicRule(const SWindowRule& r) {
*(search->second(m_pSelf.lock())) = CWindowOverridableVar(true, priority);
} else {
try {
- *(search->second(m_pSelf.lock())) = CWindowOverridableVar((bool)configStringToInt(VARS[1]), priority);
+ *(search->second(m_pSelf.lock())) = CWindowOverridableVar((bool)configStringToInt(VARS[1]).value_or(0), priority);
} catch (...) {}
}
} else if (auto search = g_pConfigManager->miWindowProperties.find(VARS[0]); search != g_pConfigManager->miWindowProperties.end()) {
diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp
index 2e1e91f2..8cddbb6b 100644
--- a/src/desktop/Workspace.cpp
+++ b/src/desktop/Workspace.cpp
@@ -332,7 +332,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
const auto SHOULDBESPECIAL = configStringToInt(prop);
- if ((bool)SHOULDBESPECIAL != m_bIsSpecialWorkspace)
+ if (SHOULDBESPECIAL && (bool)*SHOULDBESPECIAL != m_bIsSpecialWorkspace)
return false;
continue;
}
@@ -367,7 +367,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
const auto WANTSNAMED = configStringToInt(prop);
- if (WANTSNAMED != (m_iID <= -1337))
+ if (WANTSNAMED && *WANTSNAMED != (m_iID <= -1337))
return false;
continue;
}