XEvent xev;
XNextEvent (dpy, &xev);
- flush_ev.start ();
-
#ifdef USE_XIM
if (!XFilterEvent (&xev, None))
#endif
&& xev.xany.window == root
&& xev.xproperty.atom == xa[XA_XIM_SERVERS])
im_change_check ();
+
if (xev.type == MappingNotify)
XRefreshKeyboardMapping (&xev.xmapping);
}
}
}
-
- 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);
}
{
event_vec<xevent_watcher> 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