summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-04-19 14:34:35 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-04-19 23:57:13 +0200
commit9eed733f85e8003696271e63a3fcfc660511b7ef (patch)
treeb7e6c21b24a99fb329c17f90700f9839785c54b5
parent314f65c6c879bddbc656b21ce478efaa20453fa8 (diff)
fdo#46687 - fix find toolbar X error handling
Signed-off-by: Bjoern Michaelsen <bjoern.michaelsen@canonical.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;