diff options
author | Connor Lane Smith <cls@lubutu.com> | 2010-06-30 10:45:24 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2010-06-30 10:45:24 +0100 |
commit | 309d071df557142e6efc328bd1475760b4f576e6 (patch) | |
tree | 911633a8d956cb4c5843425dfcc0dabad0c5c29d | |
parent | 26b9f3de0ffe471e5335b07454147457e373c037 (diff) |
fixed no-input invisible text bug
-rw-r--r-- | dmenu.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -182,7 +182,7 @@ drawmenu(void) { | |||
182 | drawtext(&dc, *text ? text : NULL, normcol, False); | 182 | drawtext(&dc, *text ? text : NULL, normcol, False); |
183 | if(lines > 0) | 183 | if(lines > 0) |
184 | drawmenuv(); | 184 | drawmenuv(); |
185 | else | 185 | else if(curr) |
186 | drawmenuh(); | 186 | drawmenuh(); |
187 | XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, mw, mh, 0, 0); | 187 | XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, mw, mh, 0, 0); |
188 | XFlush(dpy); | 188 | XFlush(dpy); |
@@ -194,7 +194,7 @@ drawmenuh(void) { | |||
194 | 194 | ||
195 | dc.x += cmdw; | 195 | dc.x += cmdw; |
196 | dc.w = spaceitem; | 196 | dc.w = spaceitem; |
197 | drawtext(&dc, curr && curr->left ? "<" : NULL, normcol, False); | 197 | drawtext(&dc, curr->left ? "<" : NULL, normcol, False); |
198 | dc.x += dc.w; | 198 | dc.x += dc.w; |
199 | for(i = curr; i != next; i = i->right) { | 199 | for(i = curr; i != next; i = i->right) { |
200 | dc.w = MIN(textw(&dc, i->text), mw / 3); | 200 | dc.w = MIN(textw(&dc, i->text), mw / 3); |