summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-03-17 23:16:13 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-03-17 23:16:13 +0000
commite5870d47c74150aa744ed55f9b7e58713d968209 (patch)
tree227fda73f787873bc97b64be333d0e0f7d596ec7 /src/config/ConfigManager.cpp
parent91a565c7b0957968d686fccf8f3a5166b9c3fec9 (diff)
LS: add blur and ignorezero rules
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 4cfd89b6..2283ba08 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -768,7 +768,7 @@ bool windowRuleValid(const std::string& RULE) {
}
bool layerRuleValid(const std::string& RULE) {
- return !(RULE != "noanim");
+ return !(RULE != "noanim" && RULE != "blur" && RULE != "ignorezero");
}
void CConfigManager::handleWindowRule(const std::string& command, const std::string& value) {
@@ -800,9 +800,8 @@ void CConfigManager::handleLayerRule(const std::string& command, const std::stri
const auto VALUE = removeBeginEndSpacesTabs(value.substr(value.find_first_of(',') + 1));
// check rule and value
- if (RULE == "" || VALUE == "") {
+ if (RULE == "" || VALUE == "")
return;
- }
if (RULE == "unset") {
std::erase_if(m_dLayerRules, [&](const SLayerRule& other) { return other.targetNamespace == VALUE; });
@@ -816,6 +815,11 @@ void CConfigManager::handleLayerRule(const std::string& command, const std::stri
}
m_dLayerRules.push_back({VALUE, RULE});
+
+ for (auto& m : g_pCompositor->m_vMonitors)
+ for (auto& lsl : m->m_aLayerSurfaceLayers)
+ for (auto& ls : lsl)
+ ls->applyRules();
}
void CConfigManager::handleWindowRuleV2(const std::string& command, const std::string& value) {