mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 11:46:01 +01:00
handle rest of shadow extents
modified: src/render/decorations/CHyprDropShadowDecoration.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp Signed-off-by: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com>
This commit is contained in:
parent
ef4dcd55de
commit
59b436445e
2 changed files with 6 additions and 9 deletions
|
@ -114,12 +114,9 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
|
|||
fullBox.y += ((windowBox.height + 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 + fullBox.width + pMonitor->vecPosition.x - m_vLastWindowPos.x - m_vLastWindowSize.x + 2,
|
||||
// fullBox.y + fullBox.height + pMonitor->vecPosition.y - m_vLastWindowPos.y - m_vLastWindowSize.y + 2}};
|
||||
|
||||
m_seExtents.topLeft = {*PSHADOWSIZE, *PSHADOWSIZE};
|
||||
m_seExtents.bottomRight = {*PSHADOWSIZE, *PSHADOWSIZE};
|
||||
m_seExtents.topLeft = {std::max(0, windowBox.x - fullBox.x), std::max(0, windowBox.y - fullBox.y)};
|
||||
m_seExtents.bottomRight = {std::max(0, (fullBox.x + fullBox.width) - (windowBox.x + windowBox.width)),
|
||||
std::max(0, (fullBox.y + fullBox.height) - (windowBox.y + windowBox.height))};
|
||||
m_seExtents.isReservedArea = false;
|
||||
|
||||
fullBox.x += offset.x;
|
||||
|
|
|
@ -148,7 +148,8 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D&
|
|||
glStencilFunc(GL_NOTEQUAL, 1, -1);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||
|
||||
g_pHyprOpenGL->renderRect(&backBox, color, ROUNDING * pMonitor->scale);
|
||||
if (backBox.width > 0 && backBox.height > 0)
|
||||
g_pHyprOpenGL->renderRect(&backBox, color, ROUNDING * pMonitor->scale);
|
||||
|
||||
// cleanup stencil
|
||||
glClearStencil(0);
|
||||
|
@ -156,9 +157,8 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D&
|
|||
glDisable(GL_STENCIL_TEST);
|
||||
glStencilMask(-1);
|
||||
glStencilFunc(GL_ALWAYS, 1, 0xFF);
|
||||
} else {
|
||||
} else if (backBox.width > 0 && backBox.height > 0)
|
||||
g_pHyprOpenGL->renderRect(&backBox, color, ROUNDING * pMonitor->scale);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < barsToDraw; ++i) {
|
||||
|
|
Loading…
Reference in a new issue