mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-18 12:22:09 +01:00
prevent failed assert
This commit is contained in:
parent
781526dac5
commit
5ad8cead7c
1 changed files with 6 additions and 0 deletions
|
@ -97,6 +97,12 @@ void CHyprDropShadowDecoration::draw(SMonitor* pMonitor, float a) {
|
||||||
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||||
|
|
||||||
wlr_box windowBox = {m_vLastWindowPos.x - pMonitor->vecPosition.x, m_vLastWindowPos.y - pMonitor->vecPosition.y, m_vLastWindowSize.x, m_vLastWindowSize.y};
|
wlr_box windowBox = {m_vLastWindowPos.x - pMonitor->vecPosition.x, m_vLastWindowPos.y - pMonitor->vecPosition.y, m_vLastWindowSize.x, m_vLastWindowSize.y};
|
||||||
|
|
||||||
|
if (windowBox.width < 1 || windowBox.height < 1) {
|
||||||
|
glDisable(GL_STENCIL_TEST);
|
||||||
|
return; // prevent assert failed
|
||||||
|
}
|
||||||
|
|
||||||
g_pHyprOpenGL->renderRect(&windowBox, CColor(0,0,0,0), *PROUNDING);
|
g_pHyprOpenGL->renderRect(&windowBox, CColor(0,0,0,0), *PROUNDING);
|
||||||
|
|
||||||
glStencilFunc(GL_NOTEQUAL, 1, -1);
|
glStencilFunc(GL_NOTEQUAL, 1, -1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue