aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2018-03-03 10:40:52 +0100
committerDominique Martinet <asmadeus@codewreck.org>2018-03-03 11:43:23 +0100
commit2a9ba5c8dc21bfd167fc13c46b4d853cb0c70bce (patch)
tree214746a696db2440c39eb003ee682f9c454e43e2
parent3d176fcd1aee1edd09ade2000f3703bd784c1443 (diff)
xcb errors: log raw values
-rw-r--r--xwayland/xwm.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index d9899c57..549a3333 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -954,6 +954,12 @@ static void xwm_handle_focus_in(struct wlr_xwm *xwm,
}
}
+static void xwm_handle_xcb_error(struct wlr_xwm *xwm, xcb_value_error_t *ev) {
+ wlr_log(L_ERROR, "xcb error: code %d, sequence %d, value %d, opcode %d:%d",
+ ev->error_code, ev->sequence, ev->bad_value,
+ ev->minor_opcode, ev->major_opcode);
+}
+
/* This is in xcb/xcb_event.h, but pulling xcb-util just for a constant
* others redefine anyway is meh
*/
@@ -1010,9 +1016,12 @@ static int x11_event_handler(int fd, uint32_t mask, void *data) {
case XCB_FOCUS_IN:
xwm_handle_focus_in(xwm, (xcb_focus_in_event_t *)event);
break;
+ case 0:
+ xwm_handle_xcb_error(xwm, (xcb_value_error_t *)event);
+ break;
default:
- wlr_log(L_DEBUG, "X11 event: %d",
- event->response_type & XCB_EVENT_RESPONSE_TYPE_MASK);
+ wlr_log(L_DEBUG, "unhandled X11 event: %d",
+ event->response_type);
break;
}
free(event);