summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-04-19 14:34:35 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-04-19 14:35:43 +0100
commit6d97ea37bba52b21648c91276bc9281d06cdd148 (patch)
tree052fb5193c0799cd084a92ea57f7d49a281b6776
parent14480ef3f659f5559d0a73dfb8a3fecb9d3cd378 (diff)
fdo#46687 - fix find toolbar X error handling
-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 4137a8d56dd7..a647bf86429d 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;