Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
new resize stuff (using XConfigureWindow instead of XSendEvent)
[dwm.git]
/
draw.c
diff --git
a/draw.c
b/draw.c
index
b5d8bd2
..
4f8594c
100644
(file)
--- a/
draw.c
+++ b/
draw.c
@@
-99,7
+99,7
@@
drawall()
{
Client *c;
{
Client *c;
- for(c = clients; c; c = getnext(c->next
, tsel
))
+ for(c = clients; c; c = getnext(c->next))
drawtitle(c);
drawstatus();
}
drawtitle(c);
drawstatus();
}
@@
-107,7
+107,7
@@
drawall()
void
drawstatus()
{
void
drawstatus()
{
- int i;
+ int i
, x
;
Bool istile = arrange == dotile;
dc.x = dc.y = 0;
Bool istile = arrange == dotile;
dc.x = dc.y = 0;
@@
-123,15
+123,14
@@
drawstatus()
else
drawtext(tags[i], (i != tsel), True);
}
else
drawtext(tags[i], (i != tsel), True);
}
- if(sel) {
- dc.x += dc.w;
- dc.w = textw(sel->name);
- drawtext(sel->name, istile, True);
- }
+ x = dc.x + dc.w;
dc.w = textw(stext);
dc.x = bx + bw - dc.w;
drawtext(stext, !istile, False);
dc.w = textw(stext);
dc.x = bx + bw - dc.w;
drawtext(stext, !istile, False);
-
+ if(sel && ((dc.w = dc.x - x) >= bh)) {
+ dc.x = x;
+ drawtext(sel->name, istile, True);
+ }
XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
XSync(dpy, False);
}
XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
XSync(dpy, False);
}