Wait for an Expose and draw the menu immediately after mapping the window.
Kris Maglione jg@suckless.org
Tue, 06 Mar 2007 03:24:40 -0500
1 files changed,
3 insertions(+),
4 deletions(-)
jump to
M
main.c
→
main.c
@@ -479,6 +479,8 @@ if(!dc.font.set)
XSetFont(dpy, dc.gc, dc.font.xfont->fid); drawmenu(); XMapRaised(dpy, win); + XMaskEvent(dpy, ExposureMask, &ev); + drawmenu(); if(isatty(STDIN_FILENO)) { maxname = readstdin(); grabkeyboard();@@ -506,6 +508,7 @@ if(promptw > mw / 5)
promptw = mw / 5; text[0] = 0; match(text); + drawmenu(); XSync(dpy, False); /* main event loop */@@ -515,10 +518,6 @@ default: /* ignore all crap */
break; case KeyPress: kpress(&ev.xkey); - break; - case Expose: - if(ev.xexpose.count == 0) - drawmenu(); break; }