vcl/unx/gtk3/gtk3gtkinst.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
New commits: commit 8f29d128c52a4f58116fe5474222a929937d0050 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun May 5 20:53:30 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon May 6 11:30:54 2019 +0200 do focus in after all other focus handlers are run Change-Id: Ia0ddbc0181e90d0657534ad6198b21948bf47e26 Reviewed-on: https://gerrit.libreoffice.org/71829 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 81694aa208b4..b1c7cf963d3f 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1256,11 +1256,15 @@ protected: GtkWidget* m_pWidget; GtkInstanceBuilder* m_pBuilder; + DECL_LINK(async_signal_focus_in, void*, void); + static gboolean signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget) { GtkInstanceWidget* pThis = static_cast<GtkInstanceWidget*>(widget); - SolarMutexGuard aGuard; - pThis->signal_focus_in(); + // in e.g. function wizard RefEdits we want to select all when we get focus + // but there are pending gtk handlers which change selection after our handler + // post our focus in event to happen after those finish + Application::PostUserEvent(LINK(pThis, GtkInstanceWidget, async_signal_focus_in)); return false; } @@ -2061,6 +2065,11 @@ public: } }; +IMPL_LINK_NOARG(GtkInstanceWidget, async_signal_focus_in, void*, void) +{ + signal_focus_in(); +} + namespace { OString MapToGtkAccelerator(const OUString &rStr) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits