From e8c6d0f51edb2ee4a4f9039fcad5d04fbc28fbb2 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 13 Jun 2023 18:50:40 +0200 Subject: [PATCH] compositor: don't set dim percent on disabled dim --- src/Compositor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index b2ef4cefd..1e06ee03b 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1618,6 +1618,7 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) { static auto* const PSHADOWCOL = &g_pConfigManager->getConfigValuePtr("decoration:col.shadow")->intValue; static auto* const PSHADOWCOLINACTIVE = &g_pConfigManager->getConfigValuePtr("decoration:col.shadow_inactive")->intValue; static auto* const PDIMSTRENGTH = &g_pConfigManager->getConfigValuePtr("decoration:dim_strength")->floatValue; + static auto* const PDIMENABLED = &g_pConfigManager->getConfigValuePtr("decoration:dim_inactive")->intValue; auto setBorderColor = [&](CGradientValueData grad) -> void { if (grad == pWindow->m_cRealBorderColor) @@ -1668,7 +1669,7 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) { } // dim - if (pWindow == m_pLastWindow || pWindow->m_sAdditionalConfigData.forceNoDim) { + if (pWindow == m_pLastWindow || pWindow->m_sAdditionalConfigData.forceNoDim || !*PDIMENABLED) { pWindow->m_fDimPercent = 0; } else { pWindow->m_fDimPercent = *PDIMSTRENGTH;