Browse Source

Wait for an Expose and draw the menu immediately after mapping the window.

master
Kris Maglione 17 years ago
parent
commit
9911455f5b
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      main.c

+ 3
- 4
main.c View File

@ -479,6 +479,8 @@ main(int argc, char *argv[]) {
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 @@ main(int argc, char *argv[]) {
promptw = mw / 5;
text[0] = 0;
match(text);
drawmenu();
XSync(dpy, False);
/* main event loop */
@ -516,10 +519,6 @@ main(int argc, char *argv[]) {
case KeyPress:
kpress(&ev.xkey);
break;
case Expose:
if(ev.xexpose.count == 0)
drawmenu();
break;
}
/* cleanup */


Loading…
Cancel
Save