Commit 4ac0de5a authored by Jamey Sharp's avatar Jamey Sharp Committed by Alan Coopersmith

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=28595Signed-off-by: Jamey Sharp's avatarJamey Sharp <jamey@minilop.net>
(cherry picked from commit 978c7238)

Cherry pick without conflicts from master to 1.3 branch.
Signed-off-by: Pauli Nieminen's avatarPauli Nieminen <suokkos@gmail.com>
Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
parent 7f5a8fac
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment