shadow: avoid drawing empty shadows
This commit is contained in:
parent
e951011503
commit
efe29a2461
1 changed files with 3 additions and 0 deletions
|
|
@ -231,6 +231,9 @@ eDecorationLayer CHyprDropShadowDecoration::getDecorationLayer() {
|
||||||
void CHyprDropShadowDecoration::drawShadowInternal(const CBox& box, int round, float roundingPower, int range, CHyprColor color, float a) {
|
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");
|
static auto PSHADOWSHARP = CConfigValue<Hyprlang::INT>("decoration:shadow:sharp");
|
||||||
|
|
||||||
|
if (box.w < 1 || box.h < 1)
|
||||||
|
return;
|
||||||
|
|
||||||
g_pHyprOpenGL->blend(true);
|
g_pHyprOpenGL->blend(true);
|
||||||
|
|
||||||
color.a *= a;
|
color.a *= a;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue