From 882893259dd650ea138a845a959b19fd791f6838 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 23 May 2021 10:25:11 -0400 Subject: [PATCH] floxbox: Fix focus navigation We want to find focusable children, so we need 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. --- gtk/gtkflowbox.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index d994e69d08..188b76c562 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -337,8 +337,8 @@ gtk_flow_box_child_focus (GtkWidget *widget, GtkWidget *child = priv->child; gboolean had_focus = FALSE; - /* Without "can-focus" flag try to pass the focus to the child immediately */ - if (!gtk_widget_get_can_focus (widget)) + /* Without "focusable" flag try to pass the focus to the child immediately */ + if (!gtk_widget_get_focusable (widget)) { if (child) { @@ -3383,10 +3383,10 @@ gtk_flow_box_move_cursor (GtkFlowBox *box, return TRUE; } - /* If the child has its "can-focus" property set to FALSE then it will + /* If the child has its "focusable" property set to FALSE then it will * not grab the focus. We must pass the focus to its child directly. */ - if (!gtk_widget_get_can_focus (GTK_WIDGET (child))) + if (!gtk_widget_get_focusable (GTK_WIDGET (child))) { GtkWidget *subchild;