offset floating windows out of bounds on ws anims

This commit is contained in:
vaxerski 2022-10-07 12:34:54 +01:00
parent 7faa3c367d
commit 1468001d3b
6 changed files with 34 additions and 13 deletions

View file

@ -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