From 95cdedee04d2bb9b541a0c4a0c23549928f06596 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 16 Dec 2024 18:44:19 +0000 Subject: [PATCH] windowrules: fix prop rules with boolean values --- src/desktop/Window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 2858e9317..cfced8a30 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -783,7 +783,7 @@ void CWindow::applyDynamicRule(const SP& r) { } 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()) { try { - *(search->second(m_pSelf.lock())) = CWindowOverridableVar((bool)std::stoi(VARS[2]), priority); + *(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()); } } break;