if (Clients == c) Clients = c->next;
}
+void client_redraw(XConf* x, Client* c) {
+ puts("redraw");
+ XftColor fgclr, bgclr;
+ if (!c->name) return;
+ xftcolor(x, &fgclr, -1);
+ xftcolor(x, &bgclr, BackgroundColor);
+ XftDrawRect(c->xft, &bgclr, 0, 0, c->w, BARHEIGHT(x));
+ XftDrawStringUtf8(c->xft, &fgclr, x->font, 0, x->font->ascent, (const FcChar8*)c->name, strlen(c->name));
+ XftColorFree(x->display, x->visual, x->colormap, &fgclr);
+ XftColorFree(x->display, x->visual, x->colormap, &bgclr);
+}
+
void client_reconfig(XConf* xs, Client* c) {
int height = BARHEIGHT(xs);
XMoveResizeWindow(xs->display, c->frame, c->x, c->y, c->w - 2, height);
XMapWindow(xs->display, c->win);
}
}
+ client_redraw(xs, c);
XSync(xs->display, False);
}
void client_config(XConf* xs, Client* c, int x, int y, int w, int h) {
c->x = x, c->y = y, c->w = w, c->h = h;
client_reconfig(xs, c);
+ client_redraw(xs, c);
}
void client_raise(XConf* x, Client* c) {
Floating = c;
}
client_config(x, c, c->x, c->y, c->w, c->h);
+ client_redraw(x, c);
client_raise(x, c);
XSync(x->display, False);
return NULL;
}
-void client_redraw(XConf* x, Client* c) {
- puts("redraw");
- XftColor fgclr, bgclr;
- if (!c->name) return;
- xftcolor(x, &fgclr, -1);
- xftcolor(x, &bgclr, BackgroundColor);
- XftDrawRect(c->xft, &bgclr, 0, 0, c->w, BARHEIGHT(x));
- XftDrawStringUtf8(c->xft, &fgclr, x->font, 0, x->font->ascent, (const FcChar8*)c->name, strlen(c->name));
- XftColorFree(x->display, x->visual, x->colormap, &fgclr);
- XftColorFree(x->display, x->visual, x->colormap, &bgclr);
-}
-
void client_resize(XConf* x, Client* c, int dir) {
if (!c->prev) return;
Client* prev = c->prev;