[ooo-build-commit] .: 3 commits - vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Fri Oct 1 10:59:48 PDT 2010


 vcl/unx/gtk/a11y/atkutil.cxx    |    5 ++---
 vcl/unx/gtk/app/gtkdata.cxx     |    9 +++++++++
 vcl/unx/gtk/window/gtkframe.cxx |    3 ++-
 3 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 5ecf56c7547cf238d3846c9a29b865135465cf89
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 1 11:34:48 2010 +0100

    Mutter needs this fix as well as compiz

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index f45b5ef..4c24327 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1357,7 +1357,8 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
             // awesome.
             bool bHack =
                 getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity") ||
-                getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("compiz")
+                getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("compiz") ||
+                getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Mutter")
                 ;
             if( nUserTime == 0 && bHack )
             {
commit c7b7ece5ebe4ce1a0d4fe4ee7613bc8f67f368e0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 1 11:12:18 2010 +0100

    gtk_init_check sets XError/XIOError handlers, we want our own one

diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 4743aa9..265e52b 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -489,6 +489,7 @@ class GtkXLib : public SalXLib
     GSource				*m_pUserEvent;
     oslMutex             m_aDispatchMutex;
     oslCondition         m_aDispatchCondition;
+    XIOErrorHandler      m_aOrigGTKXIOErrorHandler;
 
 public:
     static gboolean      timeoutFn(gpointer data);
@@ -522,6 +523,7 @@ GtkXLib::GtkXLib()
     m_pUserEvent = NULL;
     m_aDispatchCondition = osl_createCondition();
     m_aDispatchMutex = osl_createMutex();
+    m_aOrigGTKXIOErrorHandler = NULL;
 }
 
 GtkXLib::~GtkXLib()
@@ -535,6 +537,9 @@ GtkXLib::~GtkXLib()
     osl_setCondition( m_aDispatchCondition );
     osl_destroyCondition( m_aDispatchCondition );
     osl_destroyMutex( m_aDispatchMutex );
+
+    PopXErrorLevel();
+    XSetIOErrorHandler (m_aOrigGTKXIOErrorHandler);
 }
 
 void GtkXLib::Init()
@@ -596,6 +601,10 @@ void GtkXLib::Init()
     // 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;
commit e508a9cb758fc1cd35ede231b19c6a8ba24d9ca3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 1 11:11:16 2010 +0100

    make a11y checks safer

diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 0aa0633..fce5916 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -77,11 +77,10 @@ atk_wrapper_focus_idle_handler (gpointer data)
     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


More information about the ooo-build-commit mailing list