mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 09:49:47 +01:00
compositor: don't set dim percent on disabled dim
This commit is contained in:
parent
807b52b019
commit
e8c6d0f51e
1 changed files with 2 additions and 1 deletions
|
@ -1618,6 +1618,7 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) {
|
||||||
static auto* const PSHADOWCOL = &g_pConfigManager->getConfigValuePtr("decoration:col.shadow")->intValue;
|
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 PSHADOWCOLINACTIVE = &g_pConfigManager->getConfigValuePtr("decoration:col.shadow_inactive")->intValue;
|
||||||
static auto* const PDIMSTRENGTH = &g_pConfigManager->getConfigValuePtr("decoration:dim_strength")->floatValue;
|
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 {
|
auto setBorderColor = [&](CGradientValueData grad) -> void {
|
||||||
if (grad == pWindow->m_cRealBorderColor)
|
if (grad == pWindow->m_cRealBorderColor)
|
||||||
|
@ -1668,7 +1669,7 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// dim
|
// dim
|
||||||
if (pWindow == m_pLastWindow || pWindow->m_sAdditionalConfigData.forceNoDim) {
|
if (pWindow == m_pLastWindow || pWindow->m_sAdditionalConfigData.forceNoDim || !*PDIMENABLED) {
|
||||||
pWindow->m_fDimPercent = 0;
|
pWindow->m_fDimPercent = 0;
|
||||||
} else {
|
} else {
|
||||||
pWindow->m_fDimPercent = *PDIMSTRENGTH;
|
pWindow->m_fDimPercent = *PDIMSTRENGTH;
|
||||||
|
|
Loading…
Reference in a new issue