fixed no-input invisible text bug
This commit is contained in:
parent
26b9f3de0f
commit
309d071df5
1 changed files with 2 additions and 2 deletions
4
dmenu.c
4
dmenu.c
|
@ -182,7 +182,7 @@ drawmenu(void) {
|
||||||
drawtext(&dc, *text ? text : NULL, normcol, False);
|
drawtext(&dc, *text ? text : NULL, normcol, False);
|
||||||
if(lines > 0)
|
if(lines > 0)
|
||||||
drawmenuv();
|
drawmenuv();
|
||||||
else
|
else if(curr)
|
||||||
drawmenuh();
|
drawmenuh();
|
||||||
XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, mw, mh, 0, 0);
|
XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, mw, mh, 0, 0);
|
||||||
XFlush(dpy);
|
XFlush(dpy);
|
||||||
|
@ -194,7 +194,7 @@ drawmenuh(void) {
|
||||||
|
|
||||||
dc.x += cmdw;
|
dc.x += cmdw;
|
||||||
dc.w = spaceitem;
|
dc.w = spaceitem;
|
||||||
drawtext(&dc, curr && curr->left ? "<" : NULL, normcol, False);
|
drawtext(&dc, curr->left ? "<" : NULL, normcol, False);
|
||||||
dc.x += dc.w;
|
dc.x += dc.w;
|
||||||
for(i = curr; i != next; i = i->right) {
|
for(i = curr; i != next; i = i->right) {
|
||||||
dc.w = MIN(textw(&dc, i->text), mw / 3);
|
dc.w = MIN(textw(&dc, i->text), mw / 3);
|
||||||
|
|
Loading…
Reference in a new issue