x: wrap xcb_generate_id to check for errors

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-04-08 05:49:39 +01:00
parent 8cfa750a6d
commit abeeb36bb2
8 changed files with 24 additions and 12 deletions

View File

@ -221,7 +221,7 @@ bool build_shadow(xcb_connection_t *c, xcb_drawable_t d, double opacity, const i
goto shadow_picture_err;
}
gc = xcb_generate_id(c);
gc = x_new_id(c);
xcb_create_gc(c, gc, shadow_pixmap, 0, NULL);
xcb_image_put(c, shadow_pixmap, gc, shadow_image, 0, 0, 0);

View File

@ -510,7 +510,7 @@ backend_t *backend_xrender_init(session_t *ps) {
xd->vsync = ps->o.vsync;
if (ps->present_exists) {
auto eid = xcb_generate_id(ps->c);
auto eid = x_new_id(ps->c);
auto e =
xcb_request_check(ps->c, xcb_present_select_input_checked(
ps->c, eid, xd->target_win,