From 052917a67d7cd224c0a0204fee080737de653448 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 23 May 2021 10:23:08 -0400 Subject: [PATCH] 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);