From: root Date: Sat, 26 Jan 2008 11:37:51 +0000 (+0000) Subject: undo test code X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=df9992adefcaadb0dab304e36aaa6f886369b917;p=dana%2Furxvt.git undo test code --- diff --git a/src/rxvttoolkit.C b/src/rxvttoolkit.C index 55ce1225..1cef3247 100644 --- a/src/rxvttoolkit.C +++ b/src/rxvttoolkit.C @@ -550,8 +550,6 @@ void rxvt_display::x_cb (ev::io &w, int revents) XEvent xev; XNextEvent (dpy, &xev); - flush_ev.start (); - #ifdef USE_XIM if (!XFilterEvent (&xev, None)) #endif @@ -560,6 +558,7 @@ void rxvt_display::x_cb (ev::io &w, int revents) && 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 @@ void rxvt_display::x_cb (ev::io &w, int revents) } } } - - 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); } diff --git a/src/rxvttoolkit.h b/src/rxvttoolkit.h index 8d750f4d..d009a9db 100644 --- a/src/rxvttoolkit.h +++ b/src/rxvttoolkit.h @@ -220,7 +220,7 @@ struct rxvt_display : refcounted { event_vec xw; - ev::idle flush_ev; void flush_cb (ev::idle &w, int revents); + ev::prepare flush_ev; void flush_cb (ev::prepare &w, int revents); ev::io x_ev ; void x_cb (ev::io &w, int revents); #ifdef USE_XIM