diff options
author | Alexander Larsson <alexl@redhat.com> | 2011-12-05 11:40:30 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2011-12-05 11:40:30 +0100 |
commit | 76ea76831670188fbe54a2994a58929a12eecab6 (patch) | |
tree | 9054cae0b90fbcd4cd87127aefe1faaa4587b777 /gdk | |
parent | 68843a3e93913c12d00b47380614f67e7e9763b4 (diff) | |
download | gtk+-76ea76831670188fbe54a2994a58929a12eecab6.tar.gz |
gdk: Fix alpha window background paintings on non-implicit paints
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdkwindow.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index a3a62669a4..912b9b4e31 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -2907,6 +2907,20 @@ gdk_window_begin_paint_region (GdkWindow *window, gdk_window_get_content (window), MAX (clip_box.width, 1), MAX (clip_box.height, 1)); + + /* Normally alpha backgrounded client side windows are composited on the implicit paint + by being drawn in back to front order. However, if implicit paints are not used, for + instance if it was flushed due to a non-double-buffered paint in the middle of the + expose we need to copy in the existing data here. */ + if (!gdk_window_has_impl (window) && window->has_alpha_background) + { + cairo_t *cr = cairo_create (paint->surface); + gdk_cairo_set_source_window (cr, impl_window, + - (window->abs_x + clip_box.x), + - (window->abs_y + clip_box.y)); + cairo_paint (cr); + cairo_destroy (cr); + } } cairo_surface_set_device_offset (paint->surface, -clip_box.x, -clip_box.y); |