commit 92c17cb5f204ef1ccb9ce5f150f7f417f02a0231
parent fb813f2bc1567590b8ce05b43dd347c082d2d5c1
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Fri, 24 Mar 2006 15:23:21 +0100
drawing tags into a separate label in the titlebar
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -241,16 +241,19 @@ draw_client(Client *c)
}
d.rect.x = 0;
d.rect.y = 0;
- d.rect.width = c->frame[c->sel]->rect.width;
d.rect.height = bar_height();
d.notch = nil;
tags2str(buf, sizeof(buf), c->tag, c->ntag);
- cext_strlcat(buf, " | ", sizeof(buf));
- cext_strlcat(buf, c->name, sizeof(buf) - strlen(buf));
+ d.rect.width = d.rect.height + XTextWidth(xfont, buf, strlen(buf));
d.data = buf;
blitz_drawlabel(dpy, &d);
blitz_drawborder(dpy, &d);
+ d.rect.x = d.rect.width;
+ d.rect.width = c->frame[c->sel]->rect.width - d.rect.x;
+ d.data = c->name;
+ blitz_drawlabel(dpy, &d);
+ blitz_drawborder(dpy, &d);
XSync(dpy, False);
}