diff options
author | wm4 <wm4@nowhere> | 2013-12-21 17:39:40 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 17:39:40 +0100 |
commit | 877303aaa9111fc56a8e5edbeb439699acfe44c0 (patch) | |
tree | 1f8ff3a43fc213261fd20cda86e9543bced9b8b3 /video/out | |
parent | fdceef6cc5f11ecd86f5cb6d213e82fe9fa8b66b (diff) | |
download | mpv-877303aaa9111fc56a8e5edbeb439699acfe44c0.tar.bz2 mpv-877303aaa9111fc56a8e5edbeb439699acfe44c0.tar.xz |
x11: don't set global error handler
This has similar problems as the ALSA message callback, though in theory
we could use the Display handle to find the right mpv instance from the
global callback. It still wouldn't work if another library happens to
set the error handler at the same time. There doesn't seem much of an
advantage overriding the error handler (though it used to be required),
so remove it.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/x11_common.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index a042bd0968..55a11e81b3 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -219,25 +219,6 @@ static void vo_set_cursor_hidden(struct vo *vo, bool cursor_hidden) } } -static int x11_errorhandler(Display *display, XErrorEvent *event) -{ - char msg[60]; - - XGetErrorText(display, event->error_code, (char *) &msg, sizeof(msg)); - - mp_msg(MSGT_VO, MSGL_ERR, "X11 error: %s\n", msg); - - mp_msg(MSGT_VO, MSGL_V, - "Type: %x, display: %p, resourceid: %lx, serial: %lx\n", - event->type, event->display, event->resourceid, event->serial); - mp_msg(MSGT_VO, MSGL_V, - "Error code: %x, request code: %x, minor code: %x\n", - event->error_code, event->request_code, event->minor_code); - -// abort(); - return 0; -} - struct fstype { int type; const char *sym; @@ -477,8 +458,6 @@ int vo_x11_init(struct vo *vo) }; vo->x11 = x11; - XSetErrorHandler(x11_errorhandler); - dispName = XDisplayName(NULL); MP_VERBOSE(x11, "X11 opening display: %s\n", dispName); @@ -710,7 +689,6 @@ void vo_x11_uninit(struct vo *vo) MP_VERBOSE(x11, "uninit ...\n"); if (x11->xim) XCloseIM(x11->xim); - XSetErrorHandler(NULL); XCloseDisplay(x11->display); talloc_free(x11); |