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>
Mon, 3 Oct 2022 19:48:10 +0000 (20:48 +0100)
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.

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;
 }