[gtk/BUG_gtktreeview_headers_focus_on_click_GTK4] GtkTreeviewColumn: don't focus-on-click header buttons



commit ba9b4f418df106b9cada5febeab06bf457a7b577
Author: Nelson Benítez León <nbenitezl gmail com>
Date:   Thu Apr 30 22:59:08 2020 -0400

    GtkTreeviewColumn: don't focus-on-click header buttons
    
    currently when mouse clicking on a column header
    to sort it it is grabbing keyboard focus, this
    should not happen, keyboard focus should remain
    where it was before. This can be seen on the
    GtkFileChooser widget, when having the keyboard
    focus on the file list items and clicking on a
    column header to sort it the keyboard focus is
    now on the header.

 gtk/gtktreeviewcolumn.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 75dface61c..59fca58b16 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -851,6 +851,7 @@ gtk_tree_view_column_create_button (GtkTreeViewColumn *tree_column)
 
   priv->button = gtk_button_new ();
   g_object_ref_sink (priv->button);
+  gtk_widget_set_focus_on_click (priv->button, FALSE);
 
   g_signal_connect (priv->button, "clicked",
                    G_CALLBACK (gtk_tree_view_column_button_clicked),


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