summaryrefslogtreecommitdiff
path: root/src/render/decorations/CHyprDropShadowDecoration.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-01-26 15:15:54 +0000
committerVaxry <vaxry@vaxry.net>2025-01-26 16:00:28 +0000
commitefe29a24616d4de41dd8f2f70e1493ed6b581e33 (patch)
tree76a0254cd4fe012a884be3d173314a26e2959f90 /src/render/decorations/CHyprDropShadowDecoration.cpp
parente9510115039e7ae9fcf2778e8455e7beed3424ea (diff)
shadow: avoid drawing empty shadows
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 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<Hyprlang::INT>("decoration:shadow:sharp");
+ if (box.w < 1 || box.h < 1)
+ return;
+
g_pHyprOpenGL->blend(true);
color.a *= a;