summaryrefslogtreecommitdiff
path: root/gtk/gtktreeview.c
diff options
context:
space:
mode:
authorKristian Rietveld <kris@gtk.org>2010-12-12 15:22:49 +0100
committerKristian Rietveld <kris@gtk.org>2010-12-12 15:22:49 +0100
commitff39c76bfd9ea882c80c60313b594cf73035fa6e (patch)
treecda4a45de33cd8d11b31b7a8d67320c4a0daa445 /gtk/gtktreeview.c
parentcbfc3f5bf03e837d00c90cc428d24c020af7ace1 (diff)
downloadgtk+-ff39c76bfd9ea882c80c60313b594cf73035fa6e.tar.gz
Welcome _gtk_tree_view_column_get_cell_at_pos to the second dimension
Diffstat (limited to 'gtk/gtktreeview.c')
-rw-r--r--gtk/gtktreeview.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index fd010fd74b..5833be63d2 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -3128,9 +3128,15 @@ gtk_tree_view_button_press (GtkWidget *widget,
if ((event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
tree_view->priv->shift_pressed = TRUE;
-
- /* This needs an x and a y ! */
- focus_cell = _gtk_tree_view_column_get_cell_at_pos (column, event->x - background_area.x);
+ /* We update the focus cell here, this is also needed if the
+ * column does not contain an editable cell. In this case,
+ * GtkCellArea did not receive the event for processing (and
+ * could not update the focus cell).
+ */
+ focus_cell = _gtk_tree_view_column_get_cell_at_pos (column,
+ &cell_area,
+ event->x,
+ event->y);
if (focus_cell)
gtk_tree_view_column_focus_cell (column, focus_cell);