[Xcb-commit] src

Jamey Sharp jamey at kemper.freedesktop.org
Sat Jun 2 18:29:43 PDT 2007


 src/xcb_in.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

New commits:
diff-tree e20a31d72b8838cdf31b568431b5ad78492c1481 (from 2ec1383a68bf9f4baf7125a7d6544167f38d8d62)
Author: Jamey Sharp <jamey at minilop.net>
Date:   Sat Jun 2 18:29:37 2007 -0700

    xcb_poll_for_event: Return already-read events before read(2)ing again.

diff --git a/src/xcb_in.c b/src/xcb_in.c
index 1cb6b69..2997de4 100644
--- a/src/xcb_in.c
+++ b/src/xcb_in.c
@@ -403,7 +403,8 @@ xcb_generic_event_t *xcb_poll_for_event(
     {
         _xcb_lock_io(c);
         /* FIXME: follow X meets Z architecture changes. */
-        if(_xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */
+        ret = get_event(c);
+        if(!ret && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */
             ret = get_event(c);
         _xcb_unlock_io(c);
     }


More information about the xcb-commit mailing list