summaryrefslogtreecommitdiff
path: root/src/xcb.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-08-25 13:53:37 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-08-29 22:00:55 -0700
commitff53285ae3f604e9f2cc5f4837255220459b5e44 (patch)
tree1d6a959cc46f71355b22bdfb42bf460e83ff83c6 /src/xcb.h
parent90889794ad882a6847bcffe52c4cc5dfd168f1f4 (diff)
Return connection failure if display string specifies non-existent screen
Matches the behaviour of Xlib - if you set DISPLAY to :0.1 but only have one screen, closes connection and returns error. This introduces a new connection error code: XCB_CONN_CLOSED_INVALID_SCREEN Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'src/xcb.h')
-rw-r--r--src/xcb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xcb.h b/src/xcb.h
index 179af84..f7dc6af 100644
--- a/src/xcb.h
+++ b/src/xcb.h
@@ -84,6 +84,9 @@ extern "C" {
/** Connection closed, error during parsing display string. */
#define XCB_CONN_CLOSED_PARSE_ERR 5
+/** Connection closed because the server does not have a screen matching the display. */
+#define XCB_CONN_CLOSED_INVALID_SCREEN 6
+
#define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1))
/* Opaque structures */
@@ -423,6 +426,7 @@ int xcb_get_file_descriptor(xcb_connection_t *c);
* @return XCB_CONN_CLOSED_MEM_INSUFFICIENT, when memory not available.
* @return XCB_CONN_CLOSED_REQ_LEN_EXCEED, exceeding request length that server accepts.
* @return XCB_CONN_CLOSED_PARSE_ERR, error during parsing display string.
+ * @return XCB_CONN_CLOSED_INVALID_SCREEN, because the server does not have a screen matching the display.
*/
int xcb_connection_has_error(xcb_connection_t *c);