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 f702c4ea04
commit d54d3840da
1 changed files with 4 additions and 2 deletions

View File

@ -733,9 +733,11 @@ xerror(xcb_generic_error_t *e)
&& e->major_code == XCB_CONFIGURE_WINDOW)) && e->major_code == XCB_CONFIGURE_WINDOW))
return; 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_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; return;
} }