void win_draw(win_t *win) { if (win->bar.h > 0) win_draw_bar(win); XSetWindowBackgroundPixmap(win->env.dpy, win->xwin, win->buf.pm); XClearWindow(win->env.dpy, win->xwin); XFlush(win->env.dpy); }
void win_update_bar(win_t *win) { if (win == NULL || win->xwin == None || win->pm == None) return; if (win->bar.h > 0) { win_draw_bar(win); XCopyArea(win->env.dpy, win->pm, win->xwin, gc, 0, win->h, win->w, win->bar.h, 0, win->h); } }