summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2013-08-02 13:59:00 -0400
committerAdam Jackson <ajax@redhat.com>2013-08-07 05:10:48 -0400
commitfba0c67cacccf3a042807bfe18394a5eff2e23f1 (patch)
treea20e87db694aae8d12c9000cbafc9c9084d9adfe
parentf5e377a352c3f8754a1b036343b226df3d064506 (diff)
xnest: Add a default (no-op) error handler
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--hw/xnest/Display.c11
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);