Fix drawing bg color
Anirudh Oppiliappan x@icyphox.sh
Sat, 24 Apr 2021 20:53:03 +0530
M
barito.c
→
barito.c
@@ -18,7 +18,7 @@
static unsigned long alloc_color(const char *s) { XColor color; - if(!XAllocNamedColor(dpy, colormap, s, &color, &color)) + if (!XAllocNamedColor(dpy, colormap, s, &color, &color)) errx(1, "cannot allocate color"); return color.pixel;@@ -75,9 +75,9 @@ Pixmap pix;
pix = XCreatePixmap(dpy, root, w, h, depth); - XSetForeground(dpy, gc, WhitePixel(dpy, screen)); + XSetForeground(dpy, gc, alloc_color(bg)); XFillRectangle(dpy, pix, gc, 0, 0, w, h); - XSetForeground(dpy, gc, BlackPixel(dpy, screen)); + XSetForeground(dpy, gc, alloc_color(bg)); return pix; }