commit 6e38435d5dcb9bcc13b567c8a97a95f54a64ebb9
parent 3effd917da1a019a7ce6fd009bf68811a266920b
Author: Matthew Carlson <matt@mcarlson.xyz>
Date: Fri, 23 Jul 2021 11:13:39 -0400
Merge branch 'tweaks' into st
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/x.c b/x.c
@@ -866,6 +866,14 @@ xsetcolorname(int x, const char *name)
XftColorFree(xw.dpy, xw.vis, xw.cmap, &dc.col[x]);
dc.col[x] = ncolor;
+ if (x == defaultbg) {
+ if (opt_alpha)
+ alpha = strtof(opt_alpha, NULL);
+ dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * alpha);
+ dc.col[defaultbg].pixel &= 0x00FFFFFF;
+ dc.col[defaultbg].pixel |= (unsigned char)(0xff * alpha) << 24;
+ }
+
return 0;
}