summaryrefslogtreecommitdiffstats
path: root/draw.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-08-22 19:55:20 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-08-22 19:55:20 +0200
commitdc83b9e988d12bd59ac7a5ab425308fc46ae5ed2 (patch)
tree92d4579a05b0bdcefb76eb26e196bdb9ab7c3119 /draw.c
parentfixed default key bindings (indexes of tags were screwed up) (diff)
downloaddwm-dc83b9e988d12bd59ac7a5ab425308fc46ae5ed2.tar.gz
dwm-dc83b9e988d12bd59ac7a5ab425308fc46ae5ed2.zip
titlebars contain tags in the right now
Diffstat (limited to '')
-rw-r--r--draw.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/draw.c b/draw.c
index 0ded26b..2ccaf6a 100644
--- a/draw.c
+++ b/draw.c
@@ -149,18 +149,17 @@ drawtitle(Client *c)
149 XSetWindowBorder(dpy, c->win, dc.bg); 149 XSetWindowBorder(dpy, c->win, dc.bg);
150 XMapWindow(dpy, c->title); 150 XMapWindow(dpy, c->title);
151 151
152 dc.x = dc.y = 0; 152 dc.y = dc.w = 0;
153 153 dc.x = c->tw;
154 dc.w = 0;
155 for(i = 0; i < ntags; i++) { 154 for(i = 0; i < ntags; i++) {
156 if(c->tags[i]) { 155 if(c->tags[i]) {
157 dc.x += dc.w;
158 dc.w = textw(tags[i]); 156 dc.w = textw(tags[i]);
157 dc.x -= dc.w;
159 drawtext(tags[i], !istile); 158 drawtext(tags[i], !istile);
160 } 159 }
161 } 160 }
162 dc.x += dc.w; 161 dc.w = dc.x;
163 dc.w = c->tw - dc.x; 162 dc.x = 0;
164 drawtext(c->name, !istile); 163 drawtext(c->name, !istile);
165 XCopyArea(dpy, dc.drawable, c->title, dc.gc, 0, 0, c->tw, c->th, 0, 0); 164 XCopyArea(dpy, dc.drawable, c->title, dc.gc, 0, 0, c->tw, c->th, 0, 0);
166 XSync(dpy, False); 165 XSync(dpy, False);