Fix non-double-buffered drawing

There was a sign issue in a coordinate transform that made us
flush the wrong region when flushing an implicit paint.
The non-double buffered drawing would then be drawn over the
right area, but then at the end of the implicit paint this
would be overdrawn with the area we didn't properly remove
from the implicit paint.

Also, the translation from window coords to impl window
coords is now done before removing any active double
buffered paints, as these are also in impl window coords.
This commit is contained in:
Alexander Larsson 2012-02-09 21:05:35 +01:00
parent b21dd67d60
commit 5d9736fe13

View File

@ -2765,6 +2765,9 @@ gdk_window_flush_implicit_paint (GdkWindow *window)
paint->flushed = TRUE; paint->flushed = TRUE;
region = cairo_region_copy (window->clip_region_with_children); region = cairo_region_copy (window->clip_region_with_children);
cairo_region_translate (region, window->abs_x, window->abs_y);
cairo_region_intersect (region, paint->region);
/* Don't flush active double buffers, as that may show partially done /* Don't flush active double buffers, as that may show partially done
* rendering */ * rendering */
for (list = window->paint_stack; list != NULL; list = list->next) for (list = window->paint_stack; list != NULL; list = list->next)
@ -2774,9 +2777,6 @@ gdk_window_flush_implicit_paint (GdkWindow *window)
cairo_region_subtract (region, tmp_paint->region); cairo_region_subtract (region, tmp_paint->region);
} }
cairo_region_translate (region, -window->abs_x, -window->abs_y);
cairo_region_intersect (region, paint->region);
if (!GDK_WINDOW_DESTROYED (window) && !cairo_region_is_empty (region)) if (!GDK_WINDOW_DESTROYED (window) && !cairo_region_is_empty (region))
{ {
cairo_t *cr; cairo_t *cr;