From bc5fc7fad60bfd7db903b8606b8709abaf21cf1a Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 27 Jun 2022 11:27:02 +0200 Subject: [PATCH] guard shadow w/h --- src/render/decorations/CHyprDropShadowDecoration.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp index 20dbbb30..7f472f5c 100644 --- a/src/render/decorations/CHyprDropShadowDecoration.cpp +++ b/src/render/decorations/CHyprDropShadowDecoration.cpp @@ -84,6 +84,9 @@ void CHyprDropShadowDecoration::draw(SMonitor* pMonitor, float a) { fullBox.x -= pMonitor->vecPosition.x; fullBox.y -= pMonitor->vecPosition.y; + if (fullBox.width < 1 || fullBox.height < 1) + return; // don't draw invisible shadows + if (*PSHADOWIGNOREWINDOW) { glClearStencil(0); glClear(GL_STENCIL_BUFFER_BIT);