columnview: Forward all focus to child
authorAntónio Fernandes <antoniof@gnome.org>
Sat, 10 Sep 2022 22:43:57 +0000 (22:43 +0000)
committerAntónio Fernandes <antoniof@gnome.org>
Fri, 21 Oct 2022 08:03:43 +0000 (08:03 +0000)
For the same reasoning as the preceding commit.

Also don't make GtkColumnView focusable. Its internal list view
is already focusable, which is enough to take care of the empty
view case.

(cherry picked from commit 9cb8d21cb59d2aeedcc877c4121e9032b23a573d)

gtk/gtkcolumnview.c

index 1e7299ed47575856ded397718f80325857478331..95fb02d8eb3f73286304c9d24be3ac85bd630c13 100644 (file)
@@ -659,6 +659,8 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
   gpointer iface;
 
+  widget_class->focus = gtk_widget_focus_child;
+  widget_class->grab_focus = gtk_widget_grab_focus_child;
   widget_class->measure = gtk_column_view_measure;
   widget_class->size_allocate = gtk_column_view_allocate;
 
@@ -1314,7 +1316,6 @@ gtk_column_view_init (GtkColumnView *self)
                           g_quark_from_static_string (I_("view")));
 
   gtk_widget_set_overflow (GTK_WIDGET (self), GTK_OVERFLOW_HIDDEN);
-  gtk_widget_set_focusable (GTK_WIDGET (self), TRUE);
 
   self->reorderable = TRUE;
 }