vcl/unx/gtk3/gtk3gtkinst.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
New commits: commit e1488697f01ea80f2e835e600b4498f8b34003fe Author: Caolán McNamara <[email protected]> AuthorDate: Mon Nov 23 11:42:20 2020 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Nov 23 16:16:39 2020 +0100 tdf#137662 ignore focus in dropdown if dropdown is hidden Change-Id: I0263fb832f31c6926ac63cab79ce8fd0b9548581 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 2d10bc2d4647..4e1fae380e90 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 [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
