((x)->font->height + 3)
enum {
- TOO_SMALL = (1 << 0)
+ TOO_SMALL = (1 << 0),
};
typedef struct Client {
int flags, x, y, w, h;
} Client;
+typedef struct Column {
+ struct Column *next;
+ struct Client* clients;
+ int flags, x, w;
+} Column;
+
XConf X = {0};
Client* Clients = NULL;
Cursor Move_Cursor;
int StartY = 0;
+Column* Columns = NULL;
+
/* configuration */
uint32_t BorderWidth = 1;
uint32_t BorderColor = 0xFF0000;
void client_redraw(XConf* x, Client* c) {
puts("redraw");
- XftColor clr;
+ XftColor fgclr, bgclr;
if (!c->name) return;
- xftcolor(x, &clr, -1);
- XftDrawStringUtf8(c->xft, &clr, x->font, 0, x->font->ascent, (const FcChar8*)c->name, strlen(c->name));
- XftColorFree(x->display, x->visual, x->colormap, &clr);
+ 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) {