Krolyxon
Commit b5526c9

Branches

Refs →

nsxivb5526c9

Gray window background

Author
Bert
Date
2011-01-17 19:53 +0100
Parent
47d107e
Commit
b5526c9db0bad914688c906d3f35422cb9128e29

+8 −1

1 file changed

  1. M window.c +8 −1
M window.c View
@@ -32,6 +32,8 @@ XColor bgcol;
3232
3333 void win_open(win_t *win) {
3434 XClassHint *classhint;
35+ XSetWindowAttributes attr;
36+ unsigned long mask;
3537
3638 if (win == NULL)
3739 return;
@@ -54,9 +56,14 @@ void win_open(win_t *win) {
5456 win->x = (scrw - win->w) / 2;
5557 win->y = (scrh - win->h) / 2;
5658
59+ attr.backing_store = NotUseful;
60+ attr.background_pixel = bgcol.pixel;
61+ attr.save_under = False;
62+ mask = CWBackingStore | CWBackPixel | CWSaveUnder;
63+
5764 win->xwin = XCreateWindow(dpy, RootWindow(dpy, scr),
5865 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);
6067 if (win->xwin == None)
6168 FATAL("could not create window");
6269