repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 8d4e6894e60222c8aae28090909602db5f653b8e:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 8d4e6894e60222c8aae28090909602db5f653b8e
Author: Marc Lehmann 
Date:   Fri Nov 23 07:59:14 2007 +0000

    allow spurious notifications

diff --git a/Changes b/Changes
index 5ede126d879eceb3e7b96d59a4f7dfe9e9a95a0f..
index ..b571a39e2c5204193bda9a44d4eb6060224a6b11 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 626c7104a16b43b3b50f31e89d253cdbdf545bec..
index ..5779905fa411324c1d8dc8889ad60e3df992c6ef 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)

-----END OF PAGE-----