aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h2
-rw-r--r--window.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/config.h b/config.h
index 63c5d0f..e048124 100644
--- a/config.h
+++ b/config.h
@@ -9,3 +9,5 @@
#define ZOOM_MIN 12.5
#define ZOOM_MAX 400
+/* */
+#define BG_COLOR "#777777"
diff --git a/window.c b/window.c
index b7732fa..f9852f9 100644
--- a/window.c
+++ b/window.c
@@ -43,10 +43,9 @@ void win_open(win_t *win) {
scrw = DisplayWidth(dpy, scr);
scrh = DisplayHeight(dpy, scr);
- bgcol.red = 0x7000;
- bgcol.green = 0x7000;
- bgcol.blue = 0x7000;
- XAllocColor(dpy, DefaultColormap(dpy, scr), &bgcol);
+ if (!XAllocNamedColor(dpy, DefaultColormap(dpy, scr), BG_COLOR,
+ &bgcol, &bgcol))
+ FATAL("could not allocate color: %s", BG_COLOR);
if (win->w > scrw)
win->w = scrw;