Fix up rendering of non-double-buffered overlays

My previous fix for this broke the progress bar in epiphany. This fix
makes it work again, and keeps the gimp bug fixed.

Basically, whenever we do a non-double-buffered rendering we have to
flush the entire window as it might be drawn outside the double
buffering machinery.
This commit is contained in:
Alexander Larsson 2012-03-01 14:14:33 +01:00
parent 49571ccc30
commit fd0450b4e7

View File

@ -2763,6 +2763,12 @@ gdk_window_flush_implicit_paint (GdkWindow *window)
region = cairo_region_copy (window->clip_region_with_children);
cairo_region_translate (region, window->abs_x, window->abs_y);
if (paint->flushed == NULL)
paint->flushed = cairo_region_copy (region);
else
cairo_region_union (paint->flushed, region);
cairo_region_intersect (region, paint->region);
/* Don't flush active double buffers, as that may show partially done
@ -2789,11 +2795,9 @@ gdk_window_flush_implicit_paint (GdkWindow *window)
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_paint (cr);
cairo_destroy (cr);
paint->flushed = region;
}
else
cairo_region_destroy (region);
cairo_region_destroy (region);
}
/* Ends an implicit paint, paired with gdk_window_begin_implicit_paint returning TRUE */
@ -2984,9 +2988,9 @@ gdk_window_begin_paint_region (GdkWindow *window,
if (implicit_paint)
{
cairo_region_t *flushed = cairo_region_copy (implicit_paint->flushed);
cairo_region_intersect (flushed, region);
/* Convert from impl coords */
cairo_region_translate (flushed, -window->abs_x, -window->abs_y);
cairo_region_intersect (flushed, paint->region);
gdk_cairo_region (cr, flushed);
cairo_clip (cr);