vcl/unx/gtk3/gtk3gtkinst.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
New commits: commit 21ad89c4d4fe630cb132c4b396a58a38d3408396 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Nov 23 11:42:20 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Nov 23 15:34:25 2020 +0100 tdf#137662 ignore focus in dropdown if dropdown is hidden Change-Id: I0263fb832f31c6926ac63cab79ce8fd0b9548581 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106415 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 1bb6d8b1349b..c045e8e7ac80 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -15630,9 +15630,17 @@ public: { if (m_pEntry && gtk_widget_has_focus(m_pEntry)) return true; - return gtk_widget_has_focus(m_pToggleButton) || - gtk_widget_has_focus(GTK_WIDGET(m_pOverlayButton)) || - gtk_widget_has_focus(GTK_WIDGET(m_pTreeView)) || GtkInstanceWidget::has_focus(); + + if (gtk_widget_has_focus(m_pToggleButton)) + return true; + + if (gtk_widget_get_visible(GTK_WIDGET(m_pMenuWindow))) + { + if (gtk_widget_has_focus(GTK_WIDGET(m_pOverlayButton)) || gtk_widget_has_focus(GTK_WIDGET(m_pTreeView))) + return true; + } + + return GtkInstanceWidget::has_focus(); } virtual bool changed_by_direct_pick() const override _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits