--- rxvt-unicode/src/rxvttoolkit.C 2007/12/14 02:22:24 1.81 +++ rxvt-unicode/src/rxvttoolkit.C 2007/12/14 05:25:26 1.82 @@ -299,7 +299,8 @@ : refcounted (id) , selection_owner (0) { - x_ev.set (this); + x_ev .set (this); + flush_ev.set (this); } XrmDatabase @@ -473,6 +474,7 @@ if (!getsockname (fd, (sockaddr *)&sa, &sl)) is_local = sa.sun_family == AF_UNIX; + flush_ev.start (); x_ev.start (fd, ev::READ); fcntl (fd, F_SETFD, FD_CLOEXEC); @@ -569,13 +571,16 @@ } #endif } +} +void rxvt_display::flush () +{ XFlush (dpy); } -void rxvt_display::flush () +void rxvt_display::flush_cb (ev::prepare &w, int revents) { - x_cb (x_ev, ev::READ); + flush (); } void rxvt_display::reg (xevent_watcher *w)