summaryrefslogtreecommitdiff
path: root/src/render/decorations/CHyprDropShadowDecoration.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-09 22:39:19 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-09 22:39:19 +0000
commitf41fe59cb67e31c495008227d42060eebafe4c9e (patch)
treec6c04c0986bf8573e2fdd0e28ebe05ea0fdb4128 /src/render/decorations/CHyprDropShadowDecoration.cpp
parent7ff1fd9d6943ac6877da0523a95753ff9abb3cbd (diff)
fix shadow extent & offset calculations
Diffstat (limited to 'src/render/decorations/CHyprDropShadowDecoration.cpp')
-rw-r--r--src/render/decorations/CHyprDropShadowDecoration.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp
index e506f6a3..e9bcf6d1 100644
--- a/src/render/decorations/CHyprDropShadowDecoration.cpp
+++ b/src/render/decorations/CHyprDropShadowDecoration.cpp
@@ -104,8 +104,11 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
fullBox.y += ((m_vLastWindowSize.y + 2.0 * *PSHADOWSIZE) - NEWSIZE.y) / 2.0;
}
- m_seExtents = { { m_vLastWindowPos.x - fullBox.x + pMonitor->vecPosition.x + 2,
- m_vLastWindowPos.y - fullBox.y + pMonitor->vecPosition.y + 2},
+ fullBox.x += offset.x;
+ fullBox.y += offset.y;
+
+ m_seExtents = { { m_vLastWindowPos.x - fullBox.x - pMonitor->vecPosition.x + 2,
+ m_vLastWindowPos.y - fullBox.y - pMonitor->vecPosition.y + 2},
{ fullBox.x + fullBox.width + pMonitor->vecPosition.x - m_pWindow->m_vRealPosition.vec().x - m_pWindow->m_vRealSize.vec().x + 2,
fullBox.y + fullBox.height + pMonitor->vecPosition.y - m_pWindow->m_vRealPosition.vec().y - m_pWindow->m_vRealSize.vec().y + 2} };