From efe29a24616d4de41dd8f2f70e1493ed6b581e33 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 26 Jan 2025 15:15:54 +0000 Subject: [PATCH] shadow: avoid drawing empty shadows --- 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 8a934086..0b2a96d9 100644 --- a/src/render/decorations/CHyprDropShadowDecoration.cpp +++ b/src/render/decorations/CHyprDropShadowDecoration.cpp @@ -231,6 +231,9 @@ eDecorationLayer CHyprDropShadowDecoration::getDecorationLayer() { void CHyprDropShadowDecoration::drawShadowInternal(const CBox& box, int round, float roundingPower, int range, CHyprColor color, float a) { static auto PSHADOWSHARP = CConfigValue("decoration:shadow:sharp"); + if (box.w < 1 || box.h < 1) + return; + g_pHyprOpenGL->blend(true); color.a *= a;