diff options
author | arg@10ksloc.org <unknown> | 2006-07-20 15:07:35 +0200 |
---|---|---|
committer | arg@10ksloc.org <unknown> | 2006-07-20 15:07:35 +0200 |
commit | 4688ad181da14be36e034918580ec0ce5968ffdb (patch) | |
tree | e919b8e6e89400a8b5dac01fa611090f139d5b5f /draw.c | |
parent | dc5d967ee61046f899b3b49daeb9268c8161844a (diff) |
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
Diffstat (limited to 'draw.c')
-rw-r--r-- | draw.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -107,7 +107,7 @@ drawall() void drawstatus() { - int i; + int i, x; Bool istile = arrange == dotile; dc.x = dc.y = 0; @@ -123,15 +123,14 @@ drawstatus() 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); - + 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); } |