commit bdc19c863a70bc62a908685b3c420247e2e4e3f6
parent 92c17cb5f204ef1ccb9ce5f150f7f417f02a0231
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Fri, 24 Mar 2006 15:30:48 +0100
tag label in titlebar is now inverted, if the column is in max mode
Diffstat:
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -245,15 +245,24 @@ draw_client(Client *c)
d.notch = nil;
tags2str(buf, sizeof(buf), c->tag, c->ntag);
- 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.x = d.rect.height + XTextWidth(xfont, buf, strlen(buf));
d.rect.width = c->frame[c->sel]->rect.width - d.rect.x;
d.data = c->name;
blitz_drawlabel(dpy, &d);
blitz_drawborder(dpy, &d);
+
+ if(c->frame[c->sel]->area->mode == Colmax) {
+ /* invert tag label */
+ unsigned long tmp = d.color.fg;
+ d.color.fg = d.color.bg;
+ d.color.bg = tmp;
+ }
+ d.rect.width = d.rect.x;
+ d.rect.x = 0;
+ d.data = buf;
+ blitz_drawlabel(dpy, &d);
+ blitz_drawborder(dpy, &d);
+
XSync(dpy, False);
}