[gtk+] tree-view: add back gtk_style_context_set_background()



commit eacdaf28a65d0e8690307a7fd27b9f654c22a5dc
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Feb 1 11:10:23 2013 +0100

    tree-view: add back gtk_style_context_set_background()
    
    Commit ddceddaa84222f3f2b40fe5ce3b04dc7ddf6cace removed the call to
    gtk_style_context_set_background() in favour of always rendering it with
    gtk_render_background() during the draw vfunc.
    This has the side effect of making the backing window always
    transparent, which blocks GTK from applying some optimizations during
    the paint cycle. The result is that, especially in clutter-gtk
    applications, scrolling performance gets really bad.
    
    This commit partially reverts ddceddaa84222f3f2b40fe5ce3b04dc7ddf6cace
    and changes the code so that both gtk_style_context_set_background() and
    gtk_render_background() are called

 gtk/gtktreeview.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 57592f6..5de8fed 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2212,6 +2212,9 @@ gtk_tree_view_ensure_background (GtkTreeView *tree_view)
   GtkStyleContext *context;
 
   context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
+
+  gtk_style_context_set_background (context, tree_view->priv->bin_window);
+  gtk_style_context_set_background (context, gtk_widget_get_window (GTK_WIDGET (tree_view)));
   gtk_style_context_set_background (context, tree_view->priv->header_window);
 }
 



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