[gtk/focusable-fixes: 1/5] label: Fix mnemonic activation




commit 052917a67d7cd224c0a0204fee080737de653448
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 23 10:23:08 2021 -0400

    label: Fix mnemonic activation
    
    The intention of the code is to find a focusable ancestor,
    so it needs to look at the focusable property, not at
    can-focus. This is a change from GTK 3, where can-focus
    was the correct property to look at.
    
    Fixes: #3965

 gtk/gtklabel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index d75c7caf2c..68ab7fc18c 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -1930,7 +1930,7 @@ gtk_label_mnemonic_activate (GtkWidget *widget,
 
   while (parent)
     {
-      if (gtk_widget_get_can_focus (parent) ||
+      if (gtk_widget_get_focusable (parent) ||
           (!group_cycling && gtk_widget_can_activate (parent)) ||
           GTK_IS_NOTEBOOK (gtk_widget_get_parent (parent)))
         return gtk_widget_mnemonic_activate (parent, group_cycling);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]