diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-26 15:16:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-26 15:16:36 +0100 |
| commit | 5ba33f846129f3e6c0505b19f94634b24505e828 (patch) | |
| tree | aaacabe678006040c342935481a86607c66607fd /src/desktop/rule/windowRule/WindowRule.cpp | |
| parent | 329b2b356dd92ac07f4e2aa69cbce82ee9ba9d19 (diff) | |
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.
Diffstat (limited to 'src/desktop/rule/windowRule/WindowRule.cpp')
| -rw-r--r-- | src/desktop/rule/windowRule/WindowRule.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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<std::pair<CWindowRule::storageType, std::string>>& 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> CWindowRule::buildFromExecString(std::string&& s) { const std::unordered_set<CWindowRule::storageType>& CWindowRule::effectsSet() { return m_effectSet; } + +void CWindowRule::setEnabled(bool enable) { + m_enabled = enable; +} + +bool CWindowRule::isEnabled() const { + return m_enabled; +} |
