From 7e1a9f1db0471f238a954a1fd248695a2a6920d7 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 1 Jul 2011 21:48:31 +0200 Subject: xlib-xcb: Fix cairo_surface_flush() This function called directly into the xcb's surface flush function. This means that snapshots for that surface weren't detached since that's normally done in cairo_surface_flush() before calling into the backend. Fix this by using surface_flush() instead of calling into the backend directly. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=31931 Signed-off-by: Uli Schlachter --- src/cairo-xlib-xcb-surface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cairo-xlib-xcb-surface.c b/src/cairo-xlib-xcb-surface.c index b48cb929..0462e037 100644 --- a/src/cairo-xlib-xcb-surface.c +++ b/src/cairo-xlib-xcb-surface.c @@ -196,7 +196,9 @@ static cairo_status_t _cairo_xlib_xcb_surface_flush (void *abstract_surface) { cairo_xlib_xcb_surface_t *surface = abstract_surface; - return surface->xcb->base.backend->flush (surface->xcb); + /* We have to call cairo_surface_flush() to make sure snapshots are detached */ + cairo_surface_flush (&surface->xcb->base); + return CAIRO_STATUS_SUCCESS; } static cairo_status_t -- cgit v1.2.3