diff options
author | Vaxry <[email protected]> | 2024-11-05 15:44:40 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-11-05 15:44:40 +0000 |
commit | d1638a09bacd84b994de3f77746b74f427b9d41e (patch) | |
tree | f66cae3de19e6708c9c6f09dff1fffbe014d2849 /src/Compositor.cpp | |
parent | e3882b23d09aad7f5c3a708536c87b062f3b0d8d (diff) | |
download | Hyprland-d1638a09bacd84b994de3f77746b74f427b9d41e.tar.gz Hyprland-d1638a09bacd84b994de3f77746b74f427b9d41e.zip |
shadow: add sharp and refactor options
options moved to decoration:shadow:
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r-- | src/Compositor.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 62612398..495a2d85 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1893,8 +1893,8 @@ void CCompositor::updateWindowAnimatedDecorationValues(PHLWINDOW pWindow) { static auto PINACTIVEALPHA = CConfigValue<Hyprlang::FLOAT>("decoration:inactive_opacity"); static auto PACTIVEALPHA = CConfigValue<Hyprlang::FLOAT>("decoration:active_opacity"); static auto PFULLSCREENALPHA = CConfigValue<Hyprlang::FLOAT>("decoration:fullscreen_opacity"); - static auto PSHADOWCOL = CConfigValue<Hyprlang::INT>("decoration:col.shadow"); - static auto PSHADOWCOLINACTIVE = CConfigValue<Hyprlang::INT>("decoration:col.shadow_inactive"); + static auto PSHADOWCOL = CConfigValue<Hyprlang::INT>("decoration:shadow:color"); + static auto PSHADOWCOLINACTIVE = CConfigValue<Hyprlang::INT>("decoration:shadow:color_inactive"); static auto PDIMSTRENGTH = CConfigValue<Hyprlang::FLOAT>("decoration:dim_strength"); static auto PDIMENABLED = CConfigValue<Hyprlang::INT>("decoration:dim_inactive"); @@ -1965,11 +1965,10 @@ void CCompositor::updateWindowAnimatedDecorationValues(PHLWINDOW pWindow) { // shadow if (!pWindow->isX11OverrideRedirect() && !pWindow->m_bX11DoesntWantBorders) { - if (pWindow == m_pLastWindow) { + if (pWindow == m_pLastWindow) pWindow->m_cRealShadowColor = CColor(*PSHADOWCOL); - } else { - pWindow->m_cRealShadowColor = CColor(*PSHADOWCOLINACTIVE != INT_MAX ? *PSHADOWCOLINACTIVE : *PSHADOWCOL); - } + else + pWindow->m_cRealShadowColor = CColor(*PSHADOWCOLINACTIVE != INT64_MAX ? *PSHADOWCOLINACTIVE : *PSHADOWCOL); } else { pWindow->m_cRealShadowColor.setValueAndWarp(CColor(0, 0, 0, 0)); // no shadow } |