From cf566b59ce980790bc60dac8adf4df9ec8bcf9f9 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 25 Feb 2023 17:39:26 +0000 Subject: [PATCH] allow blurls by address --- src/config/ConfigManager.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 018eb420..35023b8e 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -929,10 +929,20 @@ void CConfigManager::handleWindowRuleV2(const std::string& command, const std::s } void CConfigManager::updateBlurredLS(const std::string& name, const bool forceBlur) { + const bool BYADDRESS = name.find("address:") == 0; + std::string matchName = name; + + if (BYADDRESS) { + matchName = matchName.substr(9); + } + for (auto& m : g_pCompositor->m_vMonitors) { for (auto& lsl : m->m_aLayerSurfaceLayers) { for (auto& ls : lsl) { - if (ls->szNamespace == name) + if (BYADDRESS) { + if (getFormat("0x%x", ls.get()) == matchName) + ls->forceBlur = forceBlur; + } else if (ls->szNamespace == matchName) ls->forceBlur = forceBlur; } }