summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-06-19 10:44:55 -0700
committerJamey Sharp <jamey@minilop.net>2010-06-21 13:53:10 -0700
commit978c7238789037de917b9423ea9adfb006da1260 (patch)
tree0cb16ee75802e5b45d824c056cf77634c15d045b
parentef67486c5a8aada24fd95b2991a3c4979f53805f (diff)
poll_for_response: Really handle xcb_poll_for_reply getting a reply.
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>
-rw-r--r--src/xcb_io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xcb_io.c b/src/xcb_io.c
index dac7622c..542051e8 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;
}