summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBert Münnich <ber.t@gmx.com>2013-04-14 19:50:47 +0200
committerBert Münnich <ber.t@gmx.com>2013-04-14 19:50:47 +0200
commit593da23cf309aa4dd8b221b896f9d0dc77731ad7 (patch)
tree797fc9fd61f617e4e6ffbbed52240edafb4fcfca
parent16a598ca12a8592c20ff9276fc4c25c1e624fe65 (diff)
downloadnsxiv-593da23cf309aa4dd8b221b896f9d0dc77731ad7.tar.zst
Use bgcol as window background pixel; fixed issue #89
-rw-r--r--Makefile2
-rw-r--r--window.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b7d6b84..cae679d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION = git-20130406
+VERSION = git-20130414
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
diff --git a/window.c b/window.c
index dd428cc..e0b7273 100644
--- a/window.c
+++ b/window.c
@@ -165,6 +165,8 @@ void win_open(win_t *win)
{
win_env_t *e;
XClassHint classhint;
+ XSetWindowAttributes attr;
+ unsigned long attr_mask;
XColor col;
char none_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
Pixmap none;
@@ -211,9 +213,12 @@ void win_open(win_t *win)
win->y = (e->scrh - win->h) / 2;
}
+ attr.background_pixel = win->bgcol;
+ attr_mask = CWBackPixel;
+
win->xwin = XCreateWindow(e->dpy, RootWindow(e->dpy, e->scr),
win->x, win->y, win->w, win->h, 0,
- e->depth, InputOutput, e->vis, 0, None);
+ e->depth, InputOutput, e->vis, attr_mask, &attr);
if (win->xwin == None)
die("could not create window");