[gtk/focusable-fixes: 2/5] floxbox: Fix focus navigation




commit b3b35c8b21b63af479a28cfb32496e40edb563f4
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 23 10:25:11 2021 -0400

    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;
 


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