nsxiv593da23
Use bgcol as window background pixel; fixed issue #89
+7 −2
2 files changed
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = git-20130406 | |
| 1 | + | VERSION = git-20130414 | |
| 2 | 2 | ||
| 3 | 3 | PREFIX = /usr/local | |
| 4 | 4 | MANPREFIX = $(PREFIX)/share/man | |
| @@ -165,6 +165,8 @@ void win_open(win_t *win) | |||
| 165 | 165 | { | |
| 166 | 166 | win_env_t *e; | |
| 167 | 167 | XClassHint classhint; | |
| 168 | + | XSetWindowAttributes attr; | |
| 169 | + | unsigned long attr_mask; | |
| 168 | 170 | XColor col; | |
| 169 | 171 | char none_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; | |
| 170 | 172 | Pixmap none; | |
| @@ -211,9 +213,12 @@ void win_open(win_t *win) | |||
| 211 | 213 | win->y = (e->scrh - win->h) / 2; | |
| 212 | 214 | } | |
| 213 | 215 | ||
| 216 | + | attr.background_pixel = win->bgcol; | |
| 217 | + | attr_mask = CWBackPixel; | |
| 218 | + | ||
| 214 | 219 | win->xwin = XCreateWindow(e->dpy, RootWindow(e->dpy, e->scr), | |
| 215 | 220 | win->x, win->y, win->w, win->h, 0, | |
| 216 | − | e->depth, InputOutput, e->vis, 0, None); | |
| 221 | + | e->depth, InputOutput, e->vis, attr_mask, &attr); | |
| 217 | 222 | if (win->xwin == None) | |
| 218 | 223 | die("could not create window"); | |
| 219 | 224 | ||