[Libreoffice-commits] .: Branch 'libreoffice-3-5-3' - vcl/unx

Stephan Bergmann sbergmann at kemper.freedesktop.org
Mon Apr 23 08:27:51 PDT 2012


 vcl/unx/gtk/window/gtkframe.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 348cd8a0feb871f5b7f2e558f118cdece7132d3d
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Thu Apr 19 14:34:35 2012 +0100

    fdo#46687 - fix find toolbar X error handling
    
    Signed-off-by: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
    (cherry picked from commit 9eed733f85e8003696271e63a3fcfc660511b7ef)
    
    Sigbed-off-by: Caolán McNamara <caolanm at redhat.com>
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 4869c45..f96df12 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -2224,6 +2224,8 @@ void GtkSalFrame::ToTop( sal_uInt16 nFlags )
                 // to do this we need to synchronize with the XServer
                 GetGenericData()->ErrorTrapPush();
                 XSetInputFocus( getDisplay()->GetDisplay(), widget_get_xid(m_pWindow), RevertToParent, CurrentTime );
+                // fdo#46687 - an XSync should not be necessary - but for some reason it is.
+                XSync( getDisplay()->GetDisplay(), False );
                 GetGenericData()->ErrorTrapPop();
             }
 #endif
@@ -3282,9 +3284,11 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame )
 #if !GTK_CHECK_VERSION(3,0,0)
     if( bSetFocus )
     {
+        GetGenericData()->ErrorTrapPush();
         XSetInputFocus( pThis->getDisplay()->GetDisplay(),
                         widget_get_xid(pWidget),
                         RevertToParent, CurrentTime );
+        GetGenericData()->ErrorTrapPop();
     }
 #else
     (void)pWidget; (void)bSetFocus;


More information about the Libreoffice-commits mailing list