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

@ -1995,6 +1995,14 @@ set_ignore_next(session_t *ps) {
set_ignore(ps, NextRequest(ps->dpy));
}
/**
* Ignore X errors caused by given X request.
*/
static inline void
set_ignore_cookie(session_t *ps, xcb_void_cookie_t cookie) {
set_ignore(ps, cookie.sequence);
}
/**
* Check if a window is a fullscreen window.
*