summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-04 16:54:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-04 21:12:51 +0200
commitef78c7d93e4f170ac7a7f0307a8305052524eb53 (patch)
tree5e646fc208d5ed06f6d61ef6081e340c547c1d83
parent94977bb43d8dc91023bee7afa037f6319c36ccc3 (diff)
restore focus to the GtkEntry of GtkComboBoxText on menu popdown
the font size/name dropdowns in the document toolbar should continue to restore focus to the document directly while typical ones should vcl-alike select the GtkEntry contents Change-Id: Ic6c6cd48362dac6e4476c42a4070a83cd50faa2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115104 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 65a530fd3370..afb3aeba724e 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -14684,11 +14684,13 @@ private:
{
m_bPopupActive = bIsShown;
ComboBox::signal_popup_toggled();
- if (!m_bPopupActive)
+ if (!m_bPopupActive && m_pEntry)
{
- //restore focus to the entry view when the popup is gone, which
+ disable_notify_events();
+ //restore focus to the GtkEntry when the popup is gone, which
//is what the vcl case does, to ease the transition a little
- grab_focus();
+ gtk_widget_grab_focus(m_pEntry);
+ enable_notify_events();
}
}
}