From e5870d47c74150aa744ed55f9b7e58713d968209 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 17 Mar 2023 23:16:13 +0000 Subject: LS: add blur and ignorezero rules --- src/config/ConfigManager.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/config/ConfigManager.cpp') 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) { -- cgit v1.2.3