diff options
author | Jamey Sharp <jamey@minilop.net> | 2011-01-19 00:02:45 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-01-29 10:00:57 -0800 |
commit | 4ac0de5a02410a0e5495d2e0ead6cb75498e6dc5 (patch) | |
tree | bc168b56e5886aee03ef3f1bda97726824f77c45 | |
parent | 7f5a8fac9ca8b4e90b1feea43cd562265837ed4c (diff) | |
download | xorg-lib-libX11-libX11-1.3-branch.tar.gz |
poll_for_response: Really handle xcb_poll_for_reply getting a reply.libX11-1.3-branch
Don't lose async replies. That's bad.
`xlsfonts -l`, which uses XListFontsWithInfo, worked fine, because the
_XReply path worked; that path waited for replies, rather than polling.
However, XRecordProcessReplies, which does nothing but call XPending,
relied on the event-handling path to process async replies, and that was
busted.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=28595
Signed-off-by: Jamey Sharp <jamey@minilop.net>
(cherry picked from commit 978c7238789037de917b9423ea9adfb006da1260)
Cherry pick without conflicts from master to 1.3 branch.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/xcb_io.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xcb_io.c b/src/xcb_io.c index 72881d87..7e685de4 100644 --- a/src/xcb_io.c +++ b/src/xcb_io.c @@ -239,8 +239,9 @@ static xcb_generic_reply_t *poll_for_response(Display *dpy) { assert(XLIB_SEQUENCE_COMPARE(req->sequence, <=, dpy->request)); dpy->last_request_read = req->sequence; - if(!response) - dequeue_pending_request(dpy, req); + if(response) + break; + dequeue_pending_request(dpy, req); if(error) return (xcb_generic_reply_t *) error; } |