summaryrefslogtreecommitdiff
path: root/src/render/decorations/CHyprDropShadowDecoration.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-27 11:27:02 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-27 11:27:02 +0200
commitbc5fc7fad60bfd7db903b8606b8709abaf21cf1a (patch)
tree8e04f57be4dee3817b6eb6bfb9e34a291848c65c /src/render/decorations/CHyprDropShadowDecoration.cpp
parent3d48469cb43ac0609b112aea4e233276e04c4118 (diff)
guard shadow w/h
Diffstat (limited to 'src/render/decorations/CHyprDropShadowDecoration.cpp')
-rw-r--r--src/render/decorations/CHyprDropShadowDecoration.cpp3
1 files changed, 3 insertions, 0 deletions
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);