Fix overshooting alpha

This commit is contained in:
Przemek Grondek 2023-10-14 02:21:27 +02:00
parent a32f6523c2
commit ca1a520e02

5
x.c
View File

@ -1422,6 +1422,11 @@ chgalpha(const Arg *arg)
else
return;
if(alpha < 0)
alpha = 0;
if(alpha > 1)
alpha = 1;
dc.col[defaultbg].color.alpha = (unsigned short)(0xFFFF * alpha);
/* Required to remove artifacting from borderpx */
cresize(0, 0);