aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-07-11 17:29:41 +0200
committerGuido Günther <agx@sigxcpu.org>2018-07-11 17:29:41 +0200
commite463b49166841f71c6ee9b8922ae5dc8973174ce (patch)
tree3325dacf657dab359faa901f5f26700ab11c5df4 /backend
parent2518de655c7278728736d22549656c639e4c92f0 (diff)
x11: Check if xcb_configure_window worked
So far we did not check for any errors
Diffstat (limited to 'backend')
-rw-r--r--backend/x11/output.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/backend/x11/output.c b/backend/x11/output.c
index 9f8918ab..151807dd 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -47,8 +47,16 @@ static bool output_set_custom_mode(struct wlr_output *wlr_output,
output_set_refresh(&output->wlr_output, refresh);
const uint32_t values[] = { width, height };
- xcb_configure_window(x11->xcb_conn, output->win,
+ xcb_void_cookie_t cookie = xcb_configure_window_checked(x11->xcb_conn, output->win,
XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT, values);
+
+ xcb_generic_error_t *error;
+ if ((error = xcb_request_check(x11->xcb_conn, cookie))) {
+ wlr_log(WLR_ERROR, "Could not set window size to %dx%d\n", width, height);
+ free(error);
+ return false;
+ }
+
return true;
}