+Wed Feb 6 23:28:39 2002 Kristian Rietveld <kris@gtk.org>
+
+ Fixes #70708
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): we're dealing
+ with widget coordinates here, so take the header height into
+ account while converting
+ (gtk_tree_view_widget_to_tree_coords): take header height into
+ account
+ (gtk_tree_view_tree_to_widget_coords): ditto
+ (gtk_tree_view_get_dest_row_at_pos): we were passing coords
+ relative to the tree with _get_path_at_pos, while that function
+ wants coords relative to the widget
+
2002-02-06 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): remove unused variable
+Wed Feb 6 23:28:39 2002 Kristian Rietveld <kris@gtk.org>
+
+ Fixes #70708
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): we're dealing
+ with widget coordinates here, so take the header height into
+ account while converting
+ (gtk_tree_view_widget_to_tree_coords): take header height into
+ account
+ (gtk_tree_view_tree_to_widget_coords): ditto
+ (gtk_tree_view_get_dest_row_at_pos): we were passing coords
+ relative to the tree with _get_path_at_pos, while that function
+ wants coords relative to the widget
+
2002-02-06 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): remove unused variable
+Wed Feb 6 23:28:39 2002 Kristian Rietveld <kris@gtk.org>
+
+ Fixes #70708
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): we're dealing
+ with widget coordinates here, so take the header height into
+ account while converting
+ (gtk_tree_view_widget_to_tree_coords): take header height into
+ account
+ (gtk_tree_view_tree_to_widget_coords): ditto
+ (gtk_tree_view_get_dest_row_at_pos): we were passing coords
+ relative to the tree with _get_path_at_pos, while that function
+ wants coords relative to the widget
+
2002-02-06 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): remove unused variable
+Wed Feb 6 23:28:39 2002 Kristian Rietveld <kris@gtk.org>
+
+ Fixes #70708
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): we're dealing
+ with widget coordinates here, so take the header height into
+ account while converting
+ (gtk_tree_view_widget_to_tree_coords): take header height into
+ account
+ (gtk_tree_view_tree_to_widget_coords): ditto
+ (gtk_tree_view_get_dest_row_at_pos): we were passing coords
+ relative to the tree with _get_path_at_pos, while that function
+ wants coords relative to the widget
+
2002-02-06 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): remove unused variable
+Wed Feb 6 23:28:39 2002 Kristian Rietveld <kris@gtk.org>
+
+ Fixes #70708
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): we're dealing
+ with widget coordinates here, so take the header height into
+ account while converting
+ (gtk_tree_view_widget_to_tree_coords): take header height into
+ account
+ (gtk_tree_view_tree_to_widget_coords): ditto
+ (gtk_tree_view_get_dest_row_at_pos): we were passing coords
+ relative to the tree with _get_path_at_pos, while that function
+ wants coords relative to the widget
+
2002-02-06 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): remove unused variable
+Wed Feb 6 23:28:39 2002 Kristian Rietveld <kris@gtk.org>
+
+ Fixes #70708
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): we're dealing
+ with widget coordinates here, so take the header height into
+ account while converting
+ (gtk_tree_view_widget_to_tree_coords): take header height into
+ account
+ (gtk_tree_view_tree_to_widget_coords): ditto
+ (gtk_tree_view_get_dest_row_at_pos): we were passing coords
+ relative to the tree with _get_path_at_pos, while that function
+ wants coords relative to the widget
+
2002-02-06 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): remove unused variable
+Wed Feb 6 23:28:39 2002 Kristian Rietveld <kris@gtk.org>
+
+ Fixes #70708
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): we're dealing
+ with widget coordinates here, so take the header height into
+ account while converting
+ (gtk_tree_view_widget_to_tree_coords): take header height into
+ account
+ (gtk_tree_view_tree_to_widget_coords): ditto
+ (gtk_tree_view_get_dest_row_at_pos): we were passing coords
+ relative to the tree with _get_path_at_pos, while that function
+ wants coords relative to the widget
+
2002-02-06 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): remove unused variable
}
y_offset = _gtk_rbtree_find_offset (tree_view->priv->tree,
- TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, y),
+ TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, y - TREE_VIEW_HEADER_HEIGHT (tree_view)),
&tree, &node);
if (tree == NULL)
if (tx)
*tx = wx + tree_view->priv->hadjustment->value;
if (ty)
- *ty = wy + tree_view->priv->vadjustment->value;
+ *ty = wy + tree_view->priv->dy - TREE_VIEW_HEADER_HEIGHT (tree_view);
}
/**
if (wx)
*wx = tx - tree_view->priv->hadjustment->value;
if (wy)
- *wy = ty - tree_view->priv->vadjustment->value;
+ *wy = ty - tree_view->priv->dy + TREE_VIEW_HEADER_HEIGHT (tree_view);
}
static void
gint cell_y;
gdouble offset_into_row;
gdouble quarter;
- gint x, y;
GdkRectangle cell;
GtkTreeViewColumn *column = NULL;
GtkTreePath *tmp_path = NULL;
if (tree_view->priv->tree == NULL)
return FALSE;
- /* remember that drag_x and drag_y are in widget coords, convert to tree window */
-
- gtk_tree_view_widget_to_tree_coords (tree_view, drag_x, drag_y,
- &x, &y);
-
/* If in the top quarter of a row, we drop before that row; if
* in the bottom quarter, drop after that row; if in the middle,
* and the row has children, drop into the row.
*/
if (!gtk_tree_view_get_path_at_pos (tree_view,
- x, y,
+ drag_x, drag_y,
&tmp_path,
&column,
NULL,