summaryrefslogtreecommitdiff
path: root/src/desktop/rule/windowRule/WindowRule.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-04-26 15:16:36 +0100
committerGitHub <noreply@github.com>2026-04-26 15:16:36 +0100
commit5ba33f846129f3e6c0505b19f94634b24505e828 (patch)
treeaaacabe678006040c342935481a86607c66607fd /src/desktop/rule/windowRule/WindowRule.cpp
parent329b2b356dd92ac07f4e2aa69cbce82ee9ba9d19 (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.cpp10
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;
+}