From 6e0db8c88def1ba5758c385b7586585bcd251c5f Mon Sep 17 00:00:00 2001 From: Bert Date: Mon, 17 Jan 2011 17:19:13 +0100 Subject: New BG_COLOR setting in config.h --- window.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'window.c') 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; -- cgit v1.2.3-54-g00ecf