Provide a "has error" property for XCBConnection.
[free-sw/xcb/libxcb] / src / xcb_conn.c
index be80bac..b0d727b 100644 (file)
@@ -187,6 +187,12 @@ int XCBGetFileDescriptor(XCBConnection *c)
     return c->fd;
 }
 
+int XCBConnectionHasError(XCBConnection *c)
+{
+    /* doesn't need locking because it's read and written atomically. */
+    return c->has_error;
+}
+
 XCBConnection *XCBConnectToFD(int fd, XCBAuthInfo *auth_info)
 {
     XCBConnection* c;