Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > f3943258515968edaa2083c86398696f > files > 66

openoffice.org-3.3.0-9.3.fc14.src.rpm

diff -ru vcl.orig/unx/gtk/app/gtkdata.cxx vcl/unx/gtk/app/gtkdata.cxx
--- vcl.orig/unx/gtk/app/gtkdata.cxx	2010-07-19 15:32:25.000000000 +0100
+++ vcl/unx/gtk/app/gtkdata.cxx	2010-07-19 15:43:33.000000000 +0100
@@ -519,6 +519,7 @@
 	GSource				*m_pUserEvent;
     oslMutex             m_aDispatchMutex;
     oslCondition         m_aDispatchCondition;
+    XIOErrorHandler      m_aOrigGTKXIOErrorHandler;
 
 public:
 	static gboolean      timeoutFn(gpointer data);
@@ -552,6 +553,7 @@
     m_pUserEvent = NULL;
     m_aDispatchCondition = osl_createCondition();
     m_aDispatchMutex = osl_createMutex();
+    m_aOrigGTKXIOErrorHandler = NULL;
 }
 
 GtkXLib::~GtkXLib()
@@ -565,6 +567,9 @@
     osl_setCondition( m_aDispatchCondition );
     osl_destroyCondition( m_aDispatchCondition );
     osl_destroyMutex( m_aDispatchMutex );
+
+    PopXErrorLevel();
+    XSetIOErrorHandler (m_aOrigGTKXIOErrorHandler);
 }
 
 void GtkXLib::Init()
@@ -626,6 +631,10 @@
     // init gtk/gdk
     gtk_init_check( &nParams, &pCmdLineAry );
 
+    //gtk_init_check sets XError/XIOError handlers, we want our own one
+    m_aOrigGTKXIOErrorHandler = XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl );
+    PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) );
+
 	for (i = 0; i < nParams; i++ )
 		g_free( pCmdLineAry[i] );
 	delete [] pCmdLineAry;
diff -ru vcl/unx/gtk/a11y.orig/atkutil.cxx vcl/unx/gtk/a11y/atkutil.cxx
--- vcl.orig/unx/gtk/a11y.orig/atkutil.cxx	2010-07-28 09:07:53.000000000 +0100
+++ vcl/unx/gtk/a11y/atkutil.cxx	2010-07-28 09:10:39.000000000 +0100
@@ -77,11 +77,10 @@
     uno::Reference< accessibility::XAccessible > xAccessible = xNextFocusObject;
     if( xAccessible.get() == reinterpret_cast < accessibility::XAccessible * > (data) )
     {
+        AtkObject *atk_obj = xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : NULL;
         // Gail does not notify focus changes to NULL, so do we ..
-        if( xAccessible.is() )
+        if( atk_obj )
         {
-            AtkObject *atk_obj = atk_object_wrapper_ref( xAccessible );
-
 #ifdef ENABLE_TRACING
             fprintf(stderr, "notifying focus event for %p\n", atk_obj);
 #endif