aboutsummaryrefslogtreecommitdiff
path: root/libX11/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-20 13:23:36 +0000
committermarha <marha@users.sourceforge.net>2010-06-20 13:23:36 +0000
commit25730264872c4edbf0a4c20750aa30473198a4bf (patch)
treeba1ec067295c8b05301ac7f6a6d8c2ebe3428be9 /libX11/src
parent481fca2e77a44d0f0cd56c2732645726eec9dc6f (diff)
downloadvcxsrv-25730264872c4edbf0a4c20750aa30473198a4bf.tar.gz
vcxsrv-25730264872c4edbf0a4c20750aa30473198a4bf.tar.bz2
vcxsrv-25730264872c4edbf0a4c20750aa30473198a4bf.zip
libX11 git update 20/6/2010
Diffstat (limited to 'libX11/src')
-rw-r--r--libX11/src/xcb_io.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/libX11/src/xcb_io.c b/libX11/src/xcb_io.c
index b9140e1ca..ebf217972 100644
--- a/libX11/src/xcb_io.c
+++ b/libX11/src/xcb_io.c
@@ -232,19 +232,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)