Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi there,

        I had a poke at this heisenbug (that disappears with SAL_SYNCHRONIZE
set), and - after a bit of xtracing, discovered that (rather
un-satisfyingly) that the attached patch fixes it; it should be entirely
harmless if not entirely explained [ the error push/pop should stop this
happening anyway ].

        Tripple review for libreoffice-3-5-3 and one more for libreoffice-3-5
if possible.

        HTH,

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot
From 6d97ea37bba52b21648c91276bc9281d06cdd148 Mon Sep 17 00:00:00 2001
From: Michael Meeks <michael.meeks@suse.com>
Date: Thu, 19 Apr 2012 14:34:35 +0100
Subject: [PATCH] fdo#46687 - fix find toolbar X error handling

---
 vcl/unx/gtk/window/gtkframe.cxx |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 4137a8d..a647bf8 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -2231,6 +2231,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
@@ -3239,9 +3241,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;
-- 
1.7.7


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.