Kaydet (Commit) 8f29d128 authored tarafından Caolán McNamara's avatar Caolán McNamara

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: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 1ea27111
...@@ -1256,11 +1256,15 @@ protected: ...@@ -1256,11 +1256,15 @@ protected:
GtkWidget* m_pWidget; GtkWidget* m_pWidget;
GtkInstanceBuilder* m_pBuilder; GtkInstanceBuilder* m_pBuilder;
DECL_LINK(async_signal_focus_in, void*, void);
static gboolean signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget) static gboolean signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
{ {
GtkInstanceWidget* pThis = static_cast<GtkInstanceWidget*>(widget); GtkInstanceWidget* pThis = static_cast<GtkInstanceWidget*>(widget);
SolarMutexGuard aGuard; // in e.g. function wizard RefEdits we want to select all when we get focus
pThis->signal_focus_in(); // 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; return false;
} }
...@@ -2061,6 +2065,11 @@ public: ...@@ -2061,6 +2065,11 @@ public:
} }
}; };
IMPL_LINK_NOARG(GtkInstanceWidget, async_signal_focus_in, void*, void)
{
signal_focus_in();
}
namespace namespace
{ {
OString MapToGtkAccelerator(const OUString &rStr) OString MapToGtkAccelerator(const OUString &rStr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment