From d743ecf82e8ca7198d3b6d8a569764e8ee003238 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Sun, 12 Dec 2010 17:32:59 +0100 Subject: [PATCH] Handle clicks in indentation area For this case, we want to set focus on the first cell in the column. --- gtk/gtktreeviewcolumn.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index fd5eb1c6cf..2621cb360b 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -1479,6 +1479,14 @@ _gtk_tree_view_column_get_cell_at_pos (GtkTreeViewColumn *column, GtkCellRenderer *match = NULL; GtkTreeViewColumnPrivate *priv = column->priv; + if (x < cell_area->x) + { + /* This can happen when we click in the "indentation". In this + * case, we set x to cell_area->x, the start of the first cell. + */ + x = cell_area->x; + } + match = gtk_cell_area_get_cell_at_position (priv->cell_area, priv->cell_area_context, priv->tree_view,