+2004-10-23 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): Invalidate
+ the window if the tree is empty, to avoid resizing artifacts
+ from the focus rectangle. (#155881, Vincent Noel, patch by
+ Billy Biggs)
+
Sat Oct 23 16:14:37 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtksequence.c (_gtk_sequence_node_insert_sorted): Remove
+2004-10-23 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): Invalidate
+ the window if the tree is empty, to avoid resizing artifacts
+ from the focus rectangle. (#155881, Vincent Noel, patch by
+ Billy Biggs)
+
Sat Oct 23 16:14:37 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtksequence.c (_gtk_sequence_node_insert_sorted): Remove
+2004-10-23 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): Invalidate
+ the window if the tree is empty, to avoid resizing artifacts
+ from the focus rectangle. (#155881, Vincent Noel, patch by
+ Billy Biggs)
+
Sat Oct 23 16:14:37 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtksequence.c (_gtk_sequence_node_insert_sorted): Remove
+2004-10-23 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_size_allocate): Invalidate
+ the window if the tree is empty, to avoid resizing artifacts
+ from the focus rectangle. (#155881, Vincent Noel, patch by
+ Billy Biggs)
+
Sat Oct 23 16:14:37 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtksequence.c (_gtk_sequence_node_insert_sorted): Remove
static void install_scroll_sync_handler (GtkTreeView *tree_view);
static void gtk_tree_view_dy_to_top_row (GtkTreeView *tree_view);
static void gtk_tree_view_top_row_to_dy (GtkTreeView *tree_view);
-
+static void invalidate_empty_focus (GtkTreeView *tree_view);
/* Internal functions */
static gboolean gtk_tree_view_is_expander_column (GtkTreeView *tree_view,
gtk_tree_view_size_allocate_columns (widget);
+ if (tree_view->priv->tree == NULL)
+ invalidate_empty_focus (tree_view);
+
if (GTK_WIDGET_REALIZED (widget))
{
gboolean has_expand_column = FALSE;
return FALSE;
}
+/* Invalidate the focus rectangle near the edge of the bin_window; used when
+ * the tree is empty.
+ */
+static void
+invalidate_empty_focus (GtkTreeView *tree_view)
+{
+ GdkRectangle area;
+
+ if (!GTK_WIDGET_HAS_FOCUS (tree_view))
+ return;
+
+ area.x = 0;
+ area.y = 0;
+ gdk_drawable_get_size (tree_view->priv->bin_window, &area.width, &area.height);
+ gdk_window_invalidate_rect (tree_view->priv->bin_window, &area, FALSE);
+}
+
/* Draws a focus rectangle near the edge of the bin_window; used when the tree
* is empty.
*/