xerror: Print numeric infos about the error

xcb_event_get_{request,error}_label() return NULL for non-core requests and
error codes. Obviously, that's not really helpful at all, so also print the
numeric information about what failed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2012-06-15 10:02:25 +02:00
parent 2e7e7ae57f
commit 7f6a670137
1 changed files with 4 additions and 2 deletions

View File

@ -804,9 +804,11 @@ xerror(xcb_generic_error_t *e)
&& e->error_code == XCB_MATCH))
return;
warn("X error: request=%s, error=%s",
warn("X error: request=%s (major %d, minor %d), error=%s (%d)",
xcb_event_get_request_label(e->major_code),
xcb_event_get_error_label(e->error_code));
e->major_code, e->minor_code,
xcb_event_get_error_label(e->error_code),
e->error_code);
return;
}