aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-01-20 22:02:19 +0100
committerBert <ber.t@gmx.com>2011-01-20 22:02:19 +0100
commit376c0d90c7d9162c05e693c198911a4cf000f5a3 (patch)
treebf8515b3beeb26bcee4d9866209a12dcadb903e6
parent029e1208b91250f4bd91ecc2015d051294fb9d3f (diff)
Bigger background pixmap
-rw-r--r--window.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/window.c b/window.c
index 9feb369..aa39406 100644
--- a/window.c
+++ b/window.c
@@ -120,14 +120,17 @@ int win_configure(win_t *win, XConfigureEvent *cev) {
}
void win_clear(win_t *win) {
+ win_env_t *e;
+
if (!win)
return;
+ e = &win->env;
+
if (win->pm)
- XFreePixmap(win->env.dpy, win->pm);
- win->pm = XCreatePixmap(win->env.dpy, win->xwin, win->w, win->h,
- win->env.depth);
- XFillRectangle(win->env.dpy, win->pm, win->bgc, 0, 0, win->w, win->h);
+ XFreePixmap(e->dpy, win->pm);
+ win->pm = XCreatePixmap(e->dpy, win->xwin, e->scrw, e->scrh, e->depth);
+ XFillRectangle(e->dpy, win->pm, win->bgc, 0, 0, e->scrw, e->scrh);
}
void win_draw(win_t *win) {