Krolyxon
Commit 6e0db8c

Branches

Refs →

nsxiv6e0db8c

New BG_COLOR setting in config.h

Author
Bert
Date
2011-01-17 17:19 +0100
Parent
8c24034
Commit
6e0db8c88def1ba5758c385b7586585bcd251c5f

+5 −4

2 files changed

  1. M config.h +2 −0
  2. M window.c +3 −4
M config.h View
@@ -9,3 +9,5 @@
99 #define ZOOM_MIN 12.5
1010 #define ZOOM_MAX 400
1111
12+/* */
13+#define BG_COLOR "#777777"
M window.c View
@@ -43,10 +43,9 @@ void win_open(win_t *win) {
4343 scrw = DisplayWidth(dpy, scr);
4444 scrh = DisplayHeight(dpy, scr);
4545
46− bgcol.red = 0x7000;
47− bgcol.green = 0x7000;
48− bgcol.blue = 0x7000;
49− XAllocColor(dpy, DefaultColormap(dpy, scr), &bgcol);
46+ if (!XAllocNamedColor(dpy, DefaultColormap(dpy, scr), BG_COLOR,
47+ &bgcol, &bgcol))
48+ FATAL("could not allocate color: %s", BG_COLOR);
5049
5150 if (win->w > scrw)
5251 win->w = scrw;