From c2670e9ab90bd657e87a1da2c5322e9007dce01f Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Mon, 17 Nov 2025 18:34:02 +0000 Subject: windowrules: rewrite completely (#12269) Reworks the window rule syntax completely --------- Co-authored-by: Mihai Fufezan --- src/desktop/rule/matchEngine/IntMatchEngine.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/desktop/rule/matchEngine/IntMatchEngine.cpp (limited to 'src/desktop/rule/matchEngine/IntMatchEngine.cpp') diff --git a/src/desktop/rule/matchEngine/IntMatchEngine.cpp b/src/desktop/rule/matchEngine/IntMatchEngine.cpp new file mode 100644 index 00000000..c5bc87f6 --- /dev/null +++ b/src/desktop/rule/matchEngine/IntMatchEngine.cpp @@ -0,0 +1,14 @@ +#include "IntMatchEngine.hpp" +#include "../../../debug/Log.hpp" + +using namespace Desktop::Rule; + +CIntMatchEngine::CIntMatchEngine(const std::string& s) { + try { + m_value = std::stoi(s); + } catch (...) { Debug::log(ERR, "CIntMatchEngine: invalid input {}", s); } +} + +bool CIntMatchEngine::match(int other) { + return m_value == other; +} -- cgit v1.2.3