window: Use CAIRO_OPERATOR_SOURCE to clear to background

Some windows, like GtkWindow and some other apps, set a transparent
background. The guarantee for begin_paint_region is that there should
be a full clear to the specified background color, not a composite
against what was there before.

This fixes repaint artifacts in Wayland and Weston in a better way than
76922c169f.
This commit is contained in:
Jasper St. Pierre 2014-07-14 18:58:27 -04:00
parent b0bd9d82a3
commit 3878519449

View File

@ -2974,6 +2974,7 @@ gdk_window_clear_backing_region (GdkWindow *window)
else
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
gdk_cairo_region (cr, window->current_paint.region);
cairo_fill (cr);