allow blurls by address

This commit is contained in:
vaxerski 2023-02-25 17:39:26 +00:00
parent 1089e858b4
commit cf566b59ce

View file

@ -929,10 +929,20 @@ void CConfigManager::handleWindowRuleV2(const std::string& command, const std::s
} }
void CConfigManager::updateBlurredLS(const std::string& name, const bool forceBlur) { 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& m : g_pCompositor->m_vMonitors) {
for (auto& lsl : m->m_aLayerSurfaceLayers) { for (auto& lsl : m->m_aLayerSurfaceLayers) {
for (auto& ls : lsl) { 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; ls->forceBlur = forceBlur;
} }
} }