Fix overshooting alpha
This commit is contained in:
parent
a32f6523c2
commit
ca1a520e02
5
x.c
5
x.c
@ -1421,6 +1421,11 @@ chgalpha(const Arg *arg)
|
|||||||
alpha = alpha_def;
|
alpha = alpha_def;
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(alpha < 0)
|
||||||
|
alpha = 0;
|
||||||
|
if(alpha > 1)
|
||||||
|
alpha = 1;
|
||||||
|
|
||||||
dc.col[defaultbg].color.alpha = (unsigned short)(0xFFFF * alpha);
|
dc.col[defaultbg].color.alpha = (unsigned short)(0xFFFF * alpha);
|
||||||
/* Required to remove artifacting from borderpx */
|
/* Required to remove artifacting from borderpx */
|
||||||
|
Loading…
Reference in New Issue
Block a user