mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 17:30:10 +00:00
tree-view: add back gtk_style_context_set_background()
Commitddceddaa84
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 revertsddceddaa84
and changes the code so that both gtk_style_context_set_background() and gtk_render_background() are called
This commit is contained in:
parent
c4183405fe
commit
eacdaf28a6
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user