nsxivb5526c9
Gray window background
+8 −1
1 file changed
- M window.c +8 −1
| @@ -32,6 +32,8 @@ XColor bgcol; | |||
| 32 | 32 | ||
| 33 | 33 | void win_open(win_t *win) { | |
| 34 | 34 | XClassHint *classhint; | |
| 35 | + | XSetWindowAttributes attr; | |
| 36 | + | unsigned long mask; | |
| 35 | 37 | ||
| 36 | 38 | if (win == NULL) | |
| 37 | 39 | return; | |
| @@ -54,9 +56,14 @@ void win_open(win_t *win) { | |||
| 54 | 56 | win->x = (scrw - win->w) / 2; | |
| 55 | 57 | win->y = (scrh - win->h) / 2; | |
| 56 | 58 | ||
| 59 | + | attr.backing_store = NotUseful; | |
| 60 | + | attr.background_pixel = bgcol.pixel; | |
| 61 | + | attr.save_under = False; | |
| 62 | + | mask = CWBackingStore | CWBackPixel | CWSaveUnder; | |
| 63 | + | ||
| 57 | 64 | win->xwin = XCreateWindow(dpy, RootWindow(dpy, scr), | |
| 58 | 65 | win->x, win->y, win->w, win->h, 0, DefaultDepth(dpy, scr), InputOutput, | |
| 59 | − | DefaultVisual(dpy, scr), 0, NULL); | |
| 66 | + | DefaultVisual(dpy, scr), mask, &attr); | |
| 60 | 67 | if (win->xwin == None) | |
| 61 | 68 | FATAL("could not create window"); | |
| 62 | 69 | ||