Create cairo context after running validate_visible_area()

validate_visible_area() can change the vertical adjustment and thus
trigger window moves/scrolls.  This seems to change the surface for
which gtk_tree_view_bin_expose() just created a cairo context.  Creating
the cairo context after the call to validate_visible_area() fixes
such crashes.
This commit is contained in:
Kristian Rietveld
2010-09-15 14:20:31 +02:00
committed by Benjamin Otte
parent 0129b89153
commit 03cf19e8e2

View File

@ -4407,12 +4407,12 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
if (event->area.height < 0)
return TRUE;
validate_visible_area (tree_view);
cr = gdk_cairo_create (event->window);
gdk_cairo_region (cr, event->region);
cairo_clip (cr);
validate_visible_area (tree_view);
style = gtk_widget_get_style (widget);
new_y = TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, event->area.y);