--- rxvt-unicode/src/rxvttoolkit.C 2008/01/26 12:12:38 1.96 +++ rxvt-unicode/src/rxvttoolkit.C 2008/01/26 12:15:11 1.97 @@ -575,13 +575,11 @@ void rxvt_display::flush_cb (ev::prepare &w, int revents) { - XFlush (dpy); - if (XEventsQueued (dpy, QueuedAfterReading)) - x_cb(x_ev,0);//D - XFlush (dpy); - if (XEventsQueued (dpy, QueuedAfterReading)) - x_cb(x_ev,0);//D - XFlush (dpy); + while (XEventsQueued (dpy, QueuedAfterFlush)) + { + x_cb(x_ev,0);//D + } + w.stop (); }