Signed-off-by: Julien Cristau <[email protected]>
---
 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 0dd5105..5ce5c4c 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -966,6 +966,21 @@ hostx_get_event(EphyrHostXEvent *ev)
     {
       switch (xev->response_type)
        {
+       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;
-- 
1.7.1

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to