[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 23 15:17:15 UTC 2020
vcl/unx/gtk3/gtk3gtkinst.cxx | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
New commits:
commit e1488697f01ea80f2e835e600b4498f8b34003fe
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 23 11:42:20 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
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 <caolanm at redhat.com>
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
More information about the Libreoffice-commits
mailing list