diff options
author | marha <marha@users.sourceforge.net> | 2010-06-20 13:59:56 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-06-20 13:59:56 +0000 |
commit | e66a2779375c0aab603997d919d4c9619e4fa697 (patch) | |
tree | 5ecfe3cf0c93783b8493aab7e37fff4af61984d8 /libX11/src/xcb_io.c | |
parent | 63b723ce3a0a5126c801569bd194d00141922262 (diff) | |
parent | 25730264872c4edbf0a4c20750aa30473198a4bf (diff) | |
download | vcxsrv-e66a2779375c0aab603997d919d4c9619e4fa697.tar.gz vcxsrv-e66a2779375c0aab603997d919d4c9619e4fa697.tar.bz2 vcxsrv-e66a2779375c0aab603997d919d4c9619e4fa697.zip |
svn merge ^/branches/released .
Diffstat (limited to 'libX11/src/xcb_io.c')
-rw-r--r-- | libX11/src/xcb_io.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libX11/src/xcb_io.c b/libX11/src/xcb_io.c index 3733e1521..f8852f6bc 100644 --- a/libX11/src/xcb_io.c +++ b/libX11/src/xcb_io.c @@ -235,19 +235,25 @@ static xcb_generic_reply_t *poll_for_response(Display *dpy) void *response;
xcb_generic_error_t *error;
PendingRequest *req;
- while(!(response = poll_for_event(dpy)) &&
- (req = dpy->xcb->pending_requests) &&
+
+ response = poll_for_event(dpy);
+ if (response)
+ return response;
+
+ while((req = dpy->xcb->pending_requests) &&
!req->reply_waiter &&
xcb_poll_for_reply(dpy->xcb->connection, req->sequence, &response, &error))
{
assert(XLIB_SEQUENCE_COMPARE(req->sequence, <=, dpy->request));
dpy->last_request_read = req->sequence;
- if(!response)
- dequeue_pending_request(dpy, req);
+ if(response)
+ return response;
+ dequeue_pending_request(dpy, req);
if(error)
return (xcb_generic_reply_t *) error;
}
- return response;
+
+ return NULL;
}
static void handle_response(Display *dpy, xcb_generic_reply_t *response, Bool in_XReply)
|