From ffd6cf65e40a7140e82dc6e076c90b5119d41a54 Mon Sep 17 00:00:00 2001 From: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> Date: Tue, 15 Apr 2025 23:00:40 +0000 Subject: windowrules: allow incrementing window props (#9566) --- src/desktop/Window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/desktop/Window.cpp') diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 4b9a07fc..323aa03a 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -11,6 +11,7 @@ #include "../render/decorations/CHyprGroupBarDecoration.hpp" #include "../render/decorations/CHyprBorderDecoration.hpp" #include "../config/ConfigValue.hpp" +#include "../config/ConfigManager.hpp" #include "../managers/TokenManager.hpp" #include "../managers/AnimationManager.hpp" #include "../managers/ANRManager.hpp" @@ -780,7 +781,7 @@ void CWindow::applyDynamicRule(const SP& r) { const CVarList VARS(r->szRule, 0, ' '); if (auto search = NWindowProperties::intWindowProperties.find(VARS[1]); search != NWindowProperties::intWindowProperties.end()) { try { - *(search->second(m_pSelf.lock())) = CWindowOverridableVar(std::stoi(VARS[2]), priority); + *(search->second(m_pSelf.lock())) = CWindowOverridableVar(Hyprlang::INT(std::stoi(VARS[2])), priority); } catch (std::exception& e) { Debug::log(ERR, "Rule \"{}\" failed with: {}", r->szRule, e.what()); } } else if (auto search = NWindowProperties::floatWindowProperties.find(VARS[1]); search != NWindowProperties::floatWindowProperties.end()) { try { -- cgit v1.2.3