nsxiv376c0d9
Bigger background pixmap
+7 −4
1 file changed
- M window.c +7 −4
| @@ -120,14 +120,17 @@ int win_configure(win_t *win, XConfigureEvent *cev) { | |||
| 120 | 120 | } | |
| 121 | 121 | ||
| 122 | 122 | void win_clear(win_t *win) { | |
| 123 | + | win_env_t *e; | |
| 124 | + | ||
| 123 | 125 | if (!win) | |
| 124 | 126 | return; | |
| 125 | 127 | ||
| 128 | + | e = &win->env; | |
| 129 | + | ||
| 126 | 130 | if (win->pm) | |
| 127 | − | XFreePixmap(win->env.dpy, win->pm); | |
| 128 | − | win->pm = XCreatePixmap(win->env.dpy, win->xwin, win->w, win->h, | |
| 129 | − | win->env.depth); | |
| 130 | − | XFillRectangle(win->env.dpy, win->pm, win->bgc, 0, 0, win->w, win->h); | |
| 131 | + | XFreePixmap(e->dpy, win->pm); | |
| 132 | + | win->pm = XCreatePixmap(e->dpy, win->xwin, e->scrw, e->scrh, e->depth); | |
| 133 | + | XFillRectangle(e->dpy, win->pm, win->bgc, 0, 0, e->scrw, e->scrh); | |
| 131 | 134 | } | |
| 132 | 135 | ||
| 133 | 136 | void win_draw(win_t *win) { | |