Krolyxon
Commit 593da23

Branches

Refs →

nsxiv593da23

Use bgcol as window background pixel; fixed issue #89

Author
Bert Münnich
Date
2013-04-14 19:50 +0200
Parent
16a598c
Commit
593da23cf309aa4dd8b221b896f9d0dc77731ad7

+7 −2

2 files changed

  1. M Makefile +1 −1
  2. M window.c +6 −1
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20130406
1+VERSION = git-20130414
22
33 PREFIX = /usr/local
44 MANPREFIX = $(PREFIX)/share/man
M window.c View
@@ -165,6 +165,8 @@ void win_open(win_t *win)
165165 {
166166 win_env_t *e;
167167 XClassHint classhint;
168+ XSetWindowAttributes attr;
169+ unsigned long attr_mask;
168170 XColor col;
169171 char none_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
170172 Pixmap none;
@@ -211,9 +213,12 @@ void win_open(win_t *win)
211213 win->y = (e->scrh - win->h) / 2;
212214 }
213215
216+ attr.background_pixel = win->bgcol;
217+ attr_mask = CWBackPixel;
218+
214219 win->xwin = XCreateWindow(e->dpy, RootWindow(e->dpy, e->scr),
215220 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);
217222 if (win->xwin == None)
218223 die("could not create window");
219224