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
This commit is contained in:
Matthias Clasen 2021-05-23 10:23:08 -04:00
parent 226edf1f91
commit 052917a67d

View File

@ -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);