[gtk/wip/ernestask/tree-view-rubberband-null-node] treeview: Draw rubber band rectangle more often



commit b558f7c9eeab4e2db8afbf1382648c966bc9eaa5
Author: Ernestas Kulik <ekulik redhat com>
Date:   Wed May 1 22:03:29 2019 +0200

    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

 gtk/gtktreeview.c | 6 ++----
 1 file 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]