--- rxvt-unicode/src/rxvttoolkit.C 2008/01/26 10:24:47 1.93 +++ rxvt-unicode/src/rxvttoolkit.C 2008/01/26 11:37:51 1.94 @@ -550,8 +550,6 @@ XEvent xev; XNextEvent (dpy, &xev); - flush_ev.start (); - #ifdef USE_XIM if (!XFilterEvent (&xev, None)) #endif @@ -560,6 +558,7 @@ && xev.xany.window == root && xev.xproperty.atom == xa[XA_XIM_SERVERS]) im_change_check (); + if (xev.type == MappingNotify) XRefreshKeyboardMapping (&xev.xmapping); @@ -572,12 +571,11 @@ } } } - - XFlush (dpy); } -void rxvt_display::flush_cb (ev::idle &w, int revents) +void rxvt_display::flush_cb (ev::prepare &w, int revents) { + w.stop (); XFlush (dpy); }