summaryrefslogtreecommitdiff
path: root/src/render/decorations/CHyprDropShadowDecoration.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2022-10-07 12:34:54 +0100
committervaxerski <vaxry@vaxry.net>2022-10-07 12:34:54 +0100
commit1468001d3b62107988432df745f78f3403fa7a81 (patch)
tree964e856d43262165e8e59ac0102d59ece991c5e1 /src/render/decorations/CHyprDropShadowDecoration.cpp
parent7faa3c367d22a44417a984d9cb50b3eb82258c63 (diff)
offset floating windows out of bounds on ws anims
Diffstat (limited to 'src/render/decorations/CHyprDropShadowDecoration.cpp')
-rw-r--r--src/render/decorations/CHyprDropShadowDecoration.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp
index 3f56977b..baca1201 100644
--- a/src/render/decorations/CHyprDropShadowDecoration.cpp
+++ b/src/render/decorations/CHyprDropShadowDecoration.cpp
@@ -48,7 +48,7 @@ void CHyprDropShadowDecoration::updateWindow(CWindow* pWindow) {
}
}
-void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a) {
+void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D& offset) {
if (!g_pCompositor->windowValidMapped(m_pWindow))
return;
@@ -79,6 +79,9 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a) {
fullBox.x -= pMonitor->vecPosition.x;
fullBox.y -= pMonitor->vecPosition.y;
+ fullBox.x += offset.x;
+ fullBox.y += offset.y;
+
if (fullBox.width < 1 || fullBox.height < 1)
return; // don't draw invisible shadows