JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
tags appear in the left again
authorAnselm R. Garbe <arg@10kloc.org>
Wed, 23 Aug 2006 09:33:50 +0000 (11:33 +0200)
committerAnselm R. Garbe <arg@10kloc.org>
Wed, 23 Aug 2006 09:33:50 +0000 (11:33 +0200)
draw.c

diff --git a/draw.c b/draw.c
index 2ccaf6a..c7ef7f5 100644 (file)
--- a/draw.c
+++ b/draw.c
@@ -149,17 +149,17 @@ drawtitle(Client *c)
        XSetWindowBorder(dpy, c->win, dc.bg);
        XMapWindow(dpy, c->title);
 
-       dc.y = dc.w = 0;
-       dc.x = c->tw;
+       dc.x = dc.y = 0;
+       dc.w = 0;
        for(i = 0; i < ntags; i++) {
                if(c->tags[i]) {
+                       dc.x += dc.w;
                        dc.w = textw(tags[i]);
-                       dc.x -= dc.w;
                        drawtext(tags[i], !istile);
                }
        }
-       dc.w = dc.x;
-       dc.x = 0;
+       dc.x += dc.w;
+       dc.w = c->tw - dc.x;
        drawtext(c->name, !istile);
        XCopyArea(dpy, dc.drawable, c->title, dc.gc, 0, 0, c->tw, c->th, 0, 0);
        XSync(dpy, False);