From 5ba33f846129f3e6c0505b19f94634b24505e828 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 26 Apr 2026 15:16:36 +0100 Subject: config/lua: init lua config manager, use lua if available (#13817) Adds a new lua config manager, which will automatically be used if there is a lua config present. --- src/desktop/rule/windowRule/WindowRule.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/desktop/rule/windowRule/WindowRule.cpp') diff --git a/src/desktop/rule/windowRule/WindowRule.cpp b/src/desktop/rule/windowRule/WindowRule.cpp index b53caedc..fbabb42d 100644 --- a/src/desktop/rule/windowRule/WindowRule.cpp +++ b/src/desktop/rule/windowRule/WindowRule.cpp @@ -29,7 +29,7 @@ const std::vector>& CWindowRule } bool CWindowRule::matches(PHLWINDOW w, bool allowEnvLookup) { - if (m_matchEngines.empty()) + if (m_matchEngines.empty() || !m_enabled) return false; for (const auto& [prop, engine] : m_matchEngines) { @@ -166,3 +166,11 @@ SP CWindowRule::buildFromExecString(std::string&& s) { const std::unordered_set& CWindowRule::effectsSet() { return m_effectSet; } + +void CWindowRule::setEnabled(bool enable) { + m_enabled = enable; +} + +bool CWindowRule::isEnabled() const { + return m_enabled; +} -- cgit v1.2.3