Merge pull request #2731 from nmschulte/check-create-window

Check X11 create window call
This commit is contained in:
Ingo Bürk 2017-04-11 11:32:08 +02:00 committed by GitHub
commit 5376a972c4
1 changed files with 15 additions and 10 deletions

View File

@ -28,7 +28,7 @@ xcb_window_t create_window(xcb_connection_t *conn, Rect dims,
visual = XCB_COPY_FROM_PARENT;
}
xcb_create_window(conn,
xcb_void_cookie_t gc_cookie = xcb_create_window(conn,
depth,
result, /* the window id */
root, /* parent == root */
@ -39,6 +39,11 @@ xcb_window_t create_window(xcb_connection_t *conn, Rect dims,
mask,
values);
xcb_generic_error_t *error = xcb_request_check(conn, gc_cookie);
if (error != NULL) {
ELOG("Could not create window. Error code: %d.\n", error->error_code);
}
/* Set the cursor */
if (xcursor_supported) {
mask = XCB_CW_CURSOR;