[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Nov 24 14:07:42 UTC 2020


 vcl/unx/gtk3/gtk3gtkinst.cxx |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit cd9cbb072f7dee244e8ed71ad9372f15067b69b6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 23 11:42:20 2020 +0000
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Tue Nov 24 15:07:05 2020 +0100

    tdf#137662 ignore focus in dropdown if dropdown is hidden
    
    Change-Id: I0263fb832f31c6926ac63cab79ce8fd0b9548581
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106245
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index d3bad43b2052..0290359bebce 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -14634,9 +14634,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