Fix xcb error ignoring

The existing mechanism with set_ignore_next() is (IMHO) ugly and also
does not work with XCB requests. This commit adds a new function
set_ignore_cookie() and fixes callers that were converted to XCB to use
this new function instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2018-09-29 11:18:09 +02:00
parent 00ae9718ee
commit aa8cb217c8
3 changed files with 16 additions and 8 deletions

View File

@ -164,8 +164,8 @@ inline static void
free_damage(session_t *ps, xcb_damage_damage_t *p) {
if (*p) {
// BadDamage will be thrown if the window is destroyed
set_ignore_next(ps);
xcb_damage_destroy(XGetXCBConnection(ps->dpy), *p);
set_ignore_cookie(ps,
xcb_damage_destroy(XGetXCBConnection(ps->dpy), *p));
*p = None;
}
}