diff options
Diffstat (limited to 'hw/xnest/Display.c')
-rw-r--r-- | hw/xnest/Display.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c index a2f8acbaa..1aa911297 100644 --- a/hw/xnest/Display.c +++ b/hw/xnest/Display.c @@ -68,6 +68,15 @@ x_io_error_handler(Display * dpy) exit(1); } +static int +x_error_handler(Display *dpy, XErrorEvent *ev) +{ + ErrorF("Swallowed error code %d req %d minor %d\n", + ev->error_code, ev->request_code, ev->minor_code); + + return 0; +} + void xnestOpenDisplay(int argc, char *argv[]) { @@ -90,6 +99,8 @@ xnestOpenDisplay(int argc, char *argv[]) if (xnestSynchronize) XSynchronize(xnestDisplay, True); + XSetErrorHandler(x_error_handler); + mask = VisualScreenMask; vi.screen = DefaultScreen(xnestDisplay); xnestVisuals = XGetVisualInfo(xnestDisplay, mask, &vi, &xnestNumVisuals); |