--- rxvt-unicode/src/rxvttoolkit.C 2007/12/07 01:29:00 1.80 +++ rxvt-unicode/src/rxvttoolkit.C 2007/12/14 05:25:26 1.82 @@ -3,7 +3,7 @@ *----------------------------------------------------------------------* * * All portions of code are copyright by their respective author/s. - * Copyright (c) 2003-2006 Marc Lehmann + * Copyright (c) 2003-2007 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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)