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

@ -438,7 +438,7 @@ static inline void repair_win(session_t *ps, win *w) {
set_ignore_cookie(
ps, xcb_damage_subtract(ps->c, w->damage, XCB_NONE, XCB_NONE));
} else {
xcb_xfixes_region_t tmp = xcb_generate_id(ps->c);
xcb_xfixes_region_t tmp = x_new_id(ps->c);
xcb_xfixes_create_region(ps->c, tmp, 0, NULL);
set_ignore_cookie(ps, xcb_damage_subtract(ps->c, w->damage, XCB_NONE, tmp));
x_fetch_region(ps->c, tmp, &parts);