summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorDarksome <dev@darkso.me>2022-07-16 15:35:47 +0300
committerDarksome <dev@darkso.me>2022-07-16 15:35:47 +0300
commit68cfc1a496f556f360c032651b75d33ddb576517 (patch)
tree59c36fae97059eef50f644e6a2c6b9c15a635f18 /src/Compositor.cpp
parent08319dd1f5185e1938df86a0a0a61f06b30026f4 (diff)
parent4f9be67298d21c3039278f64ea49feb21eaca9ed (diff)
Merge branch 'main' of github.com:xDarksome/Hyprland
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index da6ba1c5..14726df8 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1170,7 +1170,8 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) {
static auto *const PINACTIVEALPHA = &g_pConfigManager->getConfigValuePtr("decoration:inactive_opacity")->floatValue;
static auto *const PACTIVEALPHA = &g_pConfigManager->getConfigValuePtr("decoration:active_opacity")->floatValue;
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;
// border
const auto RENDERDATA = g_pLayoutManager->getCurrentLayout()->requestRenderHints(pWindow);
@@ -1198,6 +1199,13 @@ void CCompositor::updateWindowAnimatedDecorationValues(CWindow* pWindow) {
else
pWindow->m_fActiveInactiveAlpha = pWindow->m_sSpecialRenderData.alphaInactive != -1 ? pWindow->m_sSpecialRenderData.alphaInactive * *PINACTIVEALPHA : *PINACTIVEALPHA;
}
+
+ // shadow
+ if (pWindow == m_pLastWindow) {
+ pWindow->m_cRealShadowColor = CColor(*PSHADOWCOL);
+ } else {
+ pWindow->m_cRealShadowColor = CColor(*PSHADOWCOLINACTIVE != INT_MAX ? *PSHADOWCOLINACTIVE : *PSHADOWCOL);
+ }
}
void CCompositor::moveWindowToWorkspace(CWindow* pWindow, const std::string& work) {