From ca1a520e02e75a6b0718fa56462433210db92a74 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sat, 14 Oct 2023 02:21:27 +0200 Subject: [PATCH] Fix overshooting alpha --- x.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x.c b/x.c index 3471a69..4c780e3 100644 --- a/x.c +++ b/x.c @@ -1421,6 +1421,11 @@ chgalpha(const Arg *arg) alpha = alpha_def; 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 */