diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-30 12:46:17 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-30 12:46:17 +0200 |
| commit | 48eb2e0d6fd756ec181b722c526f13453fa9c123 (patch) | |
| tree | 67158a41ff97f28909adaa37e71d34865c817ed4 /src/Compositor.cpp | |
| parent | 179562b646851c06ee79fa4a5e2e7386885cee0e (diff) | |
Added window dimming
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 5c9451a8..8f59f8e1 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1295,6 +1295,7 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) { static auto *const PFULLSCREENALPHA = &g_pConfigManager->getConfigValuePtr("decoration:fullscreen_opacity")->floatValue; 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; // border const auto RENDERDATA = g_pLayoutManager->getCurrentLayout()->requestRenderHints(pWindow); @@ -1323,6 +1324,13 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) { pWindow->m_fActiveInactiveAlpha = pWindow->m_sSpecialRenderData.alphaInactive != -1 ? pWindow->m_sSpecialRenderData.alphaInactive * *PINACTIVEALPHA : *PINACTIVEALPHA; } + // dim + if (pWindow == m_pLastWindow) { + pWindow->m_fDimPercent = 0; + } else { + pWindow->m_fDimPercent = *PDIMSTRENGTH; + } + // shadow if (pWindow->m_iX11Type != 2 && !pWindow->m_bX11DoesntWantBorders) { if (pWindow == m_pLastWindow) { |
