diff options
author | Julien Cristau <jcristau@debian.org> | 2010-09-25 16:05:07 +0200 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-09-03 11:02:03 -0700 |
commit | 0fc2f9f04a44599f598380d4df992bec60c0e3a1 (patch) | |
tree | cfd087673fec9ecf0b8d757c0003b799e647525e /hw/kdrive | |
parent | 3309a73c826f02c4b2e14180a3254546314ec323 (diff) |
Xephyr: handle errors in event loop
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Diffstat (limited to 'hw/kdrive')
-rw-r--r-- | hw/kdrive/ephyr/hostx.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 68bb48ae5..1eef64ef7 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -947,6 +947,21 @@ hostx_get_event(EphyrHostXEvent * ev) } switch (xev->response_type & 0x7f) { + case 0: { /* error */ + xcb_generic_error_t *e = (xcb_generic_error_t *)xev; + fprintf(stderr, "X11 error\n" + "Error code: %hhu\n" + "Sequence number: %hu\n" + "Major code: %hhu\tMinor code: %hu\n" + "Error value: %u\n", + e->error_code, + e->sequence, + e->major_code, e->minor_code, + e->resource_id); + free(xev); + exit(1); + } + case XCB_EXPOSE: { xcb_expose_event_t *expose = (xcb_expose_event_t *)xev; struct EphyrHostScreen *host_screen = |