diff options
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; +} |
