diff options
author | Kris Maglione <jg@suckless.org> | 2007-03-06 03:24:40 -0500 |
---|---|---|
committer | Kris Maglione <jg@suckless.org> | 2007-03-06 03:24:40 -0500 |
commit | 9911455f5b7787c999a570faf33cf6ad0bec056c (patch) | |
tree | 8b0ba3c847b2b13b22a7fc202de3ffce67d74452 /main.c | |
parent | 2772c51e79a5bfdf60103da02af63d972fecf9cf (diff) | |
download | dmenu-9911455f5b7787c999a570faf33cf6ad0bec056c.tar.gz dmenu-9911455f5b7787c999a570faf33cf6ad0bec056c.tar.bz2 dmenu-9911455f5b7787c999a570faf33cf6ad0bec056c.zip |
Wait for an Expose and draw the menu immediately after mapping the window.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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 */ |