From b79be47c1b4d4e48233aff1c719b5efa18799143 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 6 Feb 2012 22:03:00 +0100 Subject: [PATCH] xbmc-pvr: add patch to use XSetErrorHandler() so libX11 doesnt call exit() Signed-off-by: Stephan Raue --- ...ler_so_libX11_doesnt_call_exit.patch.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-cbe2cf3-991-use_XSetErrorHandler_so_libX11_doesnt_call_exit.patch.patch diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-cbe2cf3-991-use_XSetErrorHandler_so_libX11_doesnt_call_exit.patch.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-cbe2cf3-991-use_XSetErrorHandler_so_libX11_doesnt_call_exit.patch.patch new file mode 100644 index 0000000000..b7bbb2a019 --- /dev/null +++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-cbe2cf3-991-use_XSetErrorHandler_so_libX11_doesnt_call_exit.patch.patch @@ -0,0 +1,38 @@ +diff -Naur xbmc-f76c547/xbmc/windowing/X11/WinSystemX11.cpp xbmc-f76c547.patch/xbmc/windowing/X11/WinSystemX11.cpp +--- xbmc-f76c547/xbmc/windowing/X11/WinSystemX11.cpp 2012-02-06 15:19:03.037732518 +0100 ++++ xbmc-f76c547.patch/xbmc/windowing/X11/WinSystemX11.cpp 2012-02-06 15:18:37.545260709 +0100 +@@ -55,6 +55,8 @@ + m_bWasFullScreenBeforeMinimize = false; + m_dpyLostTime = 0; + m_internalModeSwitch = false; ++ ++ XSetErrorHandler(XErrorHandler); + } + + CWinSystemX11::~CWinSystemX11() +@@ -596,4 +598,14 @@ + m_resources.erase(i); + } + ++int CWinSystemX11::XErrorHandler(Display* dpy, XErrorEvent* error) ++{ ++ char buf[1024]; ++ XGetErrorText(error->display, error->error_code, buf, sizeof(buf)); ++ CLog::Log(LOGERROR, "CWinSystemX11::XErrorHandler: %s, type:%i, serial:%lu, error_code:%i, request_code:%i minor_code:%i", ++ buf, error->type, error->serial, (int)error->error_code, (int)error->request_code, (int)error->minor_code); ++ ++ return 0; ++} ++ + #endif +diff -Naur xbmc-f76c547/xbmc/windowing/X11/WinSystemX11.h xbmc-f76c547.patch/xbmc/windowing/X11/WinSystemX11.h +--- xbmc-f76c547/xbmc/windowing/X11/WinSystemX11.h 2012-02-06 15:19:03.038732537 +0100 ++++ xbmc-f76c547.patch/xbmc/windowing/X11/WinSystemX11.h 2012-02-06 15:17:16.253756180 +0100 +@@ -84,6 +84,7 @@ + + private: + bool IsSuitableVisual(XVisualInfo *vInfo); ++ static int XErrorHandler(Display* dpy, XErrorEvent* error); + + CStopWatch m_screensaverReset; + };