Remove deprecated public API functions in preparation for 1.0 release. Xlib-specific...
[free-sw/xcb/libxcb] / src / xcb_in.c
index 6433f0e..b45637f 100644 (file)
@@ -402,6 +402,24 @@ XCBGenericEvent *XCBPollForEvent(XCBConnection *c, int *error)
     return ret;
 }
 
+XCBGenericError *XCBRequestCheck(XCBConnection *c, XCBVoidCookie cookie)
+{
+    /* FIXME: this could hold the lock to avoid syncing unnecessarily, but
+     * that would require factoring the locking out of XCBGetInputFocus,
+     * XCBGetInputFocusReply, and XCBWaitForReply. */
+    XCBGenericError *ret;
+    void *reply;
+    if(XCB_SEQUENCE_COMPARE(cookie.sequence,>,c->in.request_expected)
+       && XCB_SEQUENCE_COMPARE(cookie.sequence,>,c->in.request_completed))
+    {
+        free(XCBGetInputFocusReply(c, XCBGetInputFocus(c), &ret));
+        assert(!ret);
+    }
+    reply = XCBWaitForReply(c, cookie.sequence, &ret);
+    assert(!reply);
+    return ret;
+}
+
 unsigned int XCBGetRequestRead(XCBConnection *c)
 {
     unsigned int ret;