guard shadow w/h

This commit is contained in:
vaxerski 2022-06-27 11:27:02 +02:00
parent 3d48469cb4
commit bc5fc7fad6

View file

@ -84,6 +84,9 @@ void CHyprDropShadowDecoration::draw(SMonitor* pMonitor, float a) {
fullBox.x -= pMonitor->vecPosition.x; fullBox.x -= pMonitor->vecPosition.x;
fullBox.y -= pMonitor->vecPosition.y; fullBox.y -= pMonitor->vecPosition.y;
if (fullBox.width < 1 || fullBox.height < 1)
return; // don't draw invisible shadows
if (*PSHADOWIGNOREWINDOW) { if (*PSHADOWIGNOREWINDOW) {
glClearStencil(0); glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT); glClear(GL_STENCIL_BUFFER_BIT);