aboutsummaryrefslogtreecommitdiff
path: root/libX11/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-22 06:37:41 +0000
committermarha <marha@users.sourceforge.net>2010-06-22 06:37:41 +0000
commit5bb359288aac7b23042dc168608f2ced46c851da (patch)
treeaab98e80efc0b86a23e4f180c43d951d6920b961 /libX11/src
parent25730264872c4edbf0a4c20750aa30473198a4bf (diff)
downloadvcxsrv-5bb359288aac7b23042dc168608f2ced46c851da.tar.gz
vcxsrv-5bb359288aac7b23042dc168608f2ced46c851da.tar.bz2
vcxsrv-5bb359288aac7b23042dc168608f2ced46c851da.zip
libXext and libX11 git update 22/6/2010
Diffstat (limited to 'libX11/src')
-rw-r--r--libX11/src/xcb_io.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libX11/src/xcb_io.c b/libX11/src/xcb_io.c
index ebf217972..a0692fec1 100644
--- a/libX11/src/xcb_io.c
+++ b/libX11/src/xcb_io.c
@@ -232,25 +232,20 @@ static xcb_generic_reply_t *poll_for_response(Display *dpy)
void *response;
xcb_generic_error_t *error;
PendingRequest *req;
-
- response = poll_for_event(dpy);
- if (response)
- return response;
-
- while((req = dpy->xcb->pending_requests) &&
+ while(!(response = poll_for_event(dpy)) &&
+ (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)
- return response;
+ break;
dequeue_pending_request(dpy, req);
if(error)
return (xcb_generic_reply_t *) error;
}
-
- return NULL;
+ return response;
}
static void handle_response(Display *dpy, xcb_generic_reply_t *response, Bool in_XReply)