Add xcbint.h to noinst_HEADERS, so it gets distributed.
[free-sw/xcb/libxcb] / src / xcb_in.c
index 4661bc4..fa13e90 100644 (file)
@@ -256,9 +256,8 @@ void *XCBWaitForReply(XCBConnection *c, unsigned int request, XCBGenericError **
     pthread_mutex_lock(&c->iolock);
 
     /* If this request has not been written yet, write it. */
-    if((signed int) (c->out.request_written - request) < 0)
-        if(!_xcb_out_flush(c))
-            goto done; /* error */
+    if(!_xcb_out_flush_to(c, request))
+        goto done; /* error */
 
     for(prev_reader = &c->in.readers; *prev_reader && (*prev_reader)->request <= request; prev_reader = &(*prev_reader)->next)
         if((*prev_reader)->request == request)
@@ -273,7 +272,7 @@ void *XCBWaitForReply(XCBConnection *c, unsigned int request, XCBGenericError **
      * wait for one. */
     while(c->in.request_completed < request &&
             !(c->in.request_read == request && c->in.current_reply))
-        if(!_xcb_conn_wait(c, /*should_write*/ 0, &cond))
+        if(!_xcb_conn_wait(c, &cond, 0, 0))
             goto done;
 
     if(c->in.request_read != request)
@@ -333,7 +332,7 @@ XCBGenericEvent *XCBWaitForEvent(XCBConnection *c)
     pthread_mutex_lock(&c->iolock);
     /* get_event returns 0 on empty list. */
     while(!(ret = get_event(c)))
-        if(!_xcb_conn_wait(c, /*should_write*/ 0, &c->in.event_cond))
+        if(!_xcb_conn_wait(c, &c->in.event_cond, 0, 0))
             break;
 
     wake_up_next_reader(c);