From 0cddbee91994577d63760ddc9d50e1d3be0990b5 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 23 Nov 2007 07:59:14 +0000 Subject: [PATCH] allow spurious notifications --- Changes | 3 +++ src/rxvttoolkit.C | 8 ++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Changes b/Changes index 5ede126d..b571a39e 100644 --- a/Changes +++ b/Changes @@ -19,6 +19,9 @@ DUMB: support tex fonts - upgrade libev to disable kqueue on anything but netbsd as it seems to be broken everywhere else w.r.t. ptys. + - allow for spurious event notifications, as at least epoll and + especially solaris ports like to lie about them (symptoms: + urxvt "hangs" until there is some x11 related activity). 8.5a Wed Nov 21 10:16:33 CET 2007 - make it compile with --disable-transparency. diff --git a/src/rxvttoolkit.C b/src/rxvttoolkit.C index 626c7104..5779905f 100644 --- a/src/rxvttoolkit.C +++ b/src/rxvttoolkit.C @@ -542,7 +542,7 @@ void rxvt_display::im_change_check () void rxvt_display::x_cb (ev::io &w, int revents) { - do + while (XEventsQueued (dpy, QueuedAfterReading)) { XEvent xev; XNextEvent (dpy, &xev); @@ -569,17 +569,13 @@ void rxvt_display::x_cb (ev::io &w, int revents) } #endif } - while (XEventsQueued (dpy, QueuedAlready)); XFlush (dpy); } void rxvt_display::flush () { - if (XEventsQueued (dpy, QueuedAlready)) - x_cb (x_ev, ev::READ); - - XFlush (dpy); + x_cb (x_ev, ev::READ); } void rxvt_display::reg (xevent_watcher *w) -- 2.34.1