summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2011-09-16 10:49:28 +0200
committerUli Schlachter <psychon@znc.in>2011-09-16 17:45:27 +0200
commita1be14693bb53f1818be2dee90f642143002d6d5 (patch)
treed6ca69399f38e89cc251318d9255c3bb7f072a8b /boilerplate
parent7ba28ff563ab8a8e77213789860b2d412577a309 (diff)
boilerplate-xcb: Print sequence numbers
The boilerplate code will now also print the low 16 bits of the sequence number for errors and events. This should make it a lot easier to find errors in e.g. a long xtrace output. Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/cairo-boilerplate-xcb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/boilerplate/cairo-boilerplate-xcb.c b/boilerplate/cairo-boilerplate-xcb.c
index 3e1b681b..f9810ee4 100644
--- a/boilerplate/cairo-boilerplate-xcb.c
+++ b/boilerplate/cairo-boilerplate-xcb.c
@@ -53,12 +53,14 @@ _cairo_boilerplate_xcb_handle_errors (xcb_target_closure_t *xtc)
xcb_generic_error_t *error = (xcb_generic_error_t *) ev;
fprintf (stderr,
- "Detected error during xcb run: %d major=%d, minor=%d\n",
- error->error_code, error->major_code, error->minor_code);
+ "Detected error during xcb run: error=%d, "
+ "seqno=0x%02x, major=%d, minor=%d\n",
+ error->error_code, error->sequence,
+ error->major_code, error->minor_code);
} else {
fprintf (stderr,
- "Detected unexpected event during xcb run: %d\n",
- ev->response_type);
+ "Detected unexpected event during xcb run: type=%d, seqno=0x%02x\n",
+ ev->response_type, ev->sequence);
}
free (ev);