[cairo-commit] src/cairo-xcb-surface.c src/cairo-xlib-surface.c

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Feb 23 08:15:18 PST 2007


 src/cairo-xcb-surface.c  |    2 +-
 src/cairo-xlib-surface.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
diff-tree 67e3b3c53bdd69e4d3503eed2db66953f1ac038c (from a1e5b91588a4f51c03487b480f13c100d07f64f8)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Feb 23 10:59:57 2007 -0500

    [xlib/xcb] Check for same_screen in is_compatible
    
    Two drawables can be used in an X and Render operation only if they share
    the same screen.  Previously we were only checking for the same display
    in is_compatible.  Check for the same screen now.

diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 8df859d..dbdcee8 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -2464,5 +2464,5 @@ _cairo_xcb_surface_is_compatible (void *
     cairo_xcb_surface_t *a = (cairo_xcb_surface_t*) surface_a;
     cairo_xcb_surface_t *b = (cairo_xcb_surface_t*) surface_b;
 
-    return (a->dpy == b->dpy);
+    return _cairo_xcb_surface_same_screen (a, b);
 }
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 9228c95..baa6f23 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -2926,5 +2926,5 @@ _cairo_xlib_surface_is_compatible (void 
     cairo_xlib_surface_t *a = (cairo_xlib_surface_t*) surface_a;
     cairo_xlib_surface_t *b = (cairo_xlib_surface_t*) surface_b;
 
-    return (a->dpy == b->dpy);
+    return _cairo_xlib_surface_same_screen (a, b);
 }


More information about the cairo-commit mailing list