forked from mirror/dwm
titlebars contain tags in the right now
This commit is contained in:
parent
8b4bc8270a
commit
dc83b9e988
1 changed files with 5 additions and 6 deletions
11
draw.c
11
draw.c
|
@ -149,18 +149,17 @@ drawtitle(Client *c)
|
||||||
XSetWindowBorder(dpy, c->win, dc.bg);
|
XSetWindowBorder(dpy, c->win, dc.bg);
|
||||||
XMapWindow(dpy, c->title);
|
XMapWindow(dpy, c->title);
|
||||||
|
|
||||||
dc.x = dc.y = 0;
|
dc.y = dc.w = 0;
|
||||||
|
dc.x = c->tw;
|
||||||
dc.w = 0;
|
|
||||||
for(i = 0; i < ntags; i++) {
|
for(i = 0; i < ntags; i++) {
|
||||||
if(c->tags[i]) {
|
if(c->tags[i]) {
|
||||||
dc.x += dc.w;
|
|
||||||
dc.w = textw(tags[i]);
|
dc.w = textw(tags[i]);
|
||||||
|
dc.x -= dc.w;
|
||||||
drawtext(tags[i], !istile);
|
drawtext(tags[i], !istile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dc.x += dc.w;
|
dc.w = dc.x;
|
||||||
dc.w = c->tw - dc.x;
|
dc.x = 0;
|
||||||
drawtext(c->name, !istile);
|
drawtext(c->name, !istile);
|
||||||
XCopyArea(dpy, dc.drawable, c->title, dc.gc, 0, 0, c->tw, c->th, 0, 0);
|
XCopyArea(dpy, dc.drawable, c->title, dc.gc, 0, 0, c->tw, c->th, 0, 0);
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
|
|
Loading…
Reference in a new issue