[cairo-commit] src/cairo-xlib-screen.c

Chris Wilson ickle at kemper.freedesktop.org
Sat May 12 02:11:55 PDT 2007


 src/cairo-xlib-screen.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

New commits:
diff-tree 40558cb15e5f7276a29847b00c9dae08b9d9380e (from abba3f2375c58401b7722837b3be37c3de9beca4)
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat May 12 10:10:49 2007 +0100

    [cairo-xlib-screen] Clear the gc_needs_clip_reset after use.
    
    After consuming the GC we need to unset the clip reset flag, so that
    if we try and get a new GC without first putting a fresh one we do not
    try to call XSetClipMask on a NULL GC.
    
    (Fixes http://bugs.freedesktop.org/show_bug.cgi?id=10921)

diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c
index 4ff3b8a..f757742 100644
--- a/src/cairo-xlib-screen.c
+++ b/src/cairo-xlib-screen.c
@@ -384,8 +384,10 @@ _cairo_xlib_screen_get_gc (cairo_xlib_sc
     gc = info->gc[depth];
     info->gc[depth] = NULL;
 
-    if (info->gc_needs_clip_reset & (1 << depth))
+    if (info->gc_needs_clip_reset & (1 << depth)) {
 	XSetClipMask(info->display->display, gc, None);
+	info->gc_needs_clip_reset &= ~(1 << depth);
+    }
 
     return gc;
 }


More information about the cairo-commit mailing list