summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-04-19 14:34:35 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-04-23 17:26:50 +0200
commit348cd8a0feb871f5b7f2e558f118cdece7132d3d (patch)
tree70992030b868df20ef8a6d3a6d88e8620d2e0a69
parent5a39623867709b271db738ba259817eb5d6f1674 (diff)
fdo#46687 - fix find toolbar X error handling
Signed-off-by: Bjoern Michaelsen <bjoern.michaelsen@canonical.com> (cherry picked from commit 9eed733f85e8003696271e63a3fcfc660511b7ef) Sigbed-off-by: Caolán McNamara <caolanm@redhat.com> Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 4869c4594873..f96df12a2e05 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;