From 67e3b3c53bdd69e4d3503eed2db66953f1ac038c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 23 Feb 2007 10:59:57 -0500 Subject: [PATCH] [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. --- src/cairo-xcb-surface.c | 2 +- src/cairo-xlib-surface.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c index 8df859da1..dbdcee864 100644 --- a/src/cairo-xcb-surface.c +++ b/src/cairo-xcb-surface.c @@ -2464,5 +2464,5 @@ _cairo_xcb_surface_is_compatible (void *surface_a, 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 9228c95d6..baa6f23f0 100644 --- a/src/cairo-xlib-surface.c +++ b/src/cairo-xlib-surface.c @@ -2926,5 +2926,5 @@ _cairo_xlib_surface_is_compatible (void *surface_a, 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); }