From fe5c019608f0b0d476877b9159c4e4876d675001 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 3 Apr 2008 18:06:09 +0000 Subject: [PATCH] From Colin McDonald, "The X11WindowingSystemInterface in osgViewer/GraphicsWindowX11.cpp unconditionally sets the X11 error handler routine, replacing anything that was previously set. This is a bit unfriendly, as the X11 error handler is a global attribute which the application, or the GUI toolkit being used, may well have set itself. So I have modified X11WindowingSystemInterface to only replace the error handler if it is the default i.e. if the application has not set it." --- src/osgViewer/GraphicsWindowX11.cpp | 49 +++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/src/osgViewer/GraphicsWindowX11.cpp b/src/osgViewer/GraphicsWindowX11.cpp index 34d462c31..919a43159 100644 --- a/src/osgViewer/GraphicsWindowX11.cpp +++ b/src/osgViewer/GraphicsWindowX11.cpp @@ -1427,6 +1427,8 @@ void GraphicsWindowX11::requestWarpPointer(float x,float y) extern "C" { +typedef int (*X11ErrorHandler)(Display*, XErrorEvent*); + int X11ErrorHandling(Display* display, XErrorEvent* event) { osg::notify(osg::NOTICE)<<"Got an X11ErrorHandling call display="<