nsxiv6e0db8c
New BG_COLOR setting in config.h
+5 −4
2 files changed
| @@ -9,3 +9,5 @@ | |||
| 9 | 9 | #define ZOOM_MIN 12.5 | |
| 10 | 10 | #define ZOOM_MAX 400 | |
| 11 | 11 | ||
| 12 | + | /* */ | |
| 13 | + | #define BG_COLOR "#777777" | |
| @@ -43,10 +43,9 @@ void win_open(win_t *win) { | |||
| 43 | 43 | scrw = DisplayWidth(dpy, scr); | |
| 44 | 44 | scrh = DisplayHeight(dpy, scr); | |
| 45 | 45 | ||
| 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); | |
| 50 | 49 | ||
| 51 | 50 | if (win->w > scrw) | |
| 52 | 51 | win->w = scrw; | |