diff options
author | Ernestas Kulik <ekulik@redhat.com> | 2019-05-01 22:03:29 +0200 |
---|---|---|
committer | Ernestas Kulik <ekulik@redhat.com> | 2019-05-01 22:18:50 +0200 |
commit | b558f7c9eeab4e2db8afbf1382648c966bc9eaa5 (patch) | |
tree | b626b8a4a1ce7b51c501924bf7500a621f12d20e | |
parent | c860a2db85072695bbc6e8b0ffbfff6873bf503c (diff) | |
download | gtk+-b558f7c9eeab4e2db8afbf1382648c966bc9eaa5.tar.gz |
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
-rw-r--r-- | gtk/gtktreeview.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index cb7b8f7c47..3ba7a63594 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -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); |