|
@ -77,17 +77,17 @@ drawmenu() |
|
|
dc.y = 0; |
|
|
dc.y = 0; |
|
|
dc.w = mw; |
|
|
dc.w = mw; |
|
|
dc.h = mh; |
|
|
dc.h = mh; |
|
|
drawtext(NULL, False, False); |
|
|
|
|
|
|
|
|
drawtext(NULL, False); |
|
|
|
|
|
|
|
|
/* print command */ |
|
|
/* print command */ |
|
|
if(cmdw && item) |
|
|
if(cmdw && item) |
|
|
dc.w = cmdw; |
|
|
dc.w = cmdw; |
|
|
drawtext(text[0] ? text : NULL, False, False); |
|
|
|
|
|
|
|
|
drawtext(text[0] ? text : NULL, False); |
|
|
dc.x += cmdw; |
|
|
dc.x += cmdw; |
|
|
|
|
|
|
|
|
if(curr) { |
|
|
if(curr) { |
|
|
dc.w = SPACE; |
|
|
dc.w = SPACE; |
|
|
drawtext((curr && curr->left) ? "<" : NULL, False, False); |
|
|
|
|
|
|
|
|
drawtext((curr && curr->left) ? "<" : NULL, False); |
|
|
dc.x += dc.w; |
|
|
dc.x += dc.w; |
|
|
|
|
|
|
|
|
/* determine maximum items */ |
|
|
/* determine maximum items */ |
|
@ -95,13 +95,13 @@ drawmenu() |
|
|
dc.w = textw(i->text); |
|
|
dc.w = textw(i->text); |
|
|
if(dc.w > mw / 3) |
|
|
if(dc.w > mw / 3) |
|
|
dc.w = mw / 3; |
|
|
dc.w = mw / 3; |
|
|
drawtext(i->text, sel == i, sel == i); |
|
|
|
|
|
|
|
|
drawtext(i->text, sel == i); |
|
|
dc.x += dc.w; |
|
|
dc.x += dc.w; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
dc.x = mw - SPACE; |
|
|
dc.x = mw - SPACE; |
|
|
dc.w = SPACE; |
|
|
dc.w = SPACE; |
|
|
drawtext(next ? ">" : NULL, False, False); |
|
|
|
|
|
|
|
|
drawtext(next ? ">" : NULL, False); |
|
|
} |
|
|
} |
|
|
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); |
|
@ -316,7 +316,6 @@ main(int argc, char *argv[]) |
|
|
/* style */ |
|
|
/* style */ |
|
|
dc.bg = getcolor(BGCOLOR); |
|
|
dc.bg = getcolor(BGCOLOR); |
|
|
dc.fg = getcolor(FGCOLOR); |
|
|
dc.fg = getcolor(FGCOLOR); |
|
|
dc.border = getcolor(BORDERCOLOR); |
|
|
|
|
|
setfont(FONT); |
|
|
setfont(FONT); |
|
|
|
|
|
|
|
|
wa.override_redirect = 1; |
|
|
wa.override_redirect = 1; |
|
|