treeview: Draw rubber band rectangle more often

If the cursor coordinates are outside of the content (the GtkRBTree),
gtk_tree_view_bin_draw() will return and not draw the rubber band
rectangle.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1859
This commit is contained in:
Ernestas Kulik
2019-05-01 22:03:29 +02:00
parent c860a2db85
commit b558f7c9ee

View File

@ -5024,7 +5024,7 @@ gtk_tree_view_bin_draw (GtkWidget *widget,
guint flags;
gint bin_window_width;
gint bin_window_height;
GtkTreePath *drag_dest_path;
GtkTreePath *drag_dest_path = NULL;
GList *first_column, *last_column;
gint vertical_separator;
gint horizontal_separator;
@ -5078,7 +5078,7 @@ gtk_tree_view_bin_draw (GtkWidget *widget,
}
if (node == NULL)
return TRUE;
goto done;
/* find the path for the node */
path = _gtk_tree_path_new_from_rbtree (tree, node);
@ -5087,8 +5087,6 @@ gtk_tree_view_bin_draw (GtkWidget *widget,
path);
depth = gtk_tree_path_get_depth (path);
gtk_tree_path_free (path);
drag_dest_path = NULL;
if (tree_view->priv->drag_dest_row)
drag_dest_path = gtk_tree_row_reference_get_path (tree_view->priv->drag_dest_row);