From ff5376563b1042ebea8a438acb309bcd8678cdc5 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 11 Apr 2008 23:47:07 +0100 Subject: [PATCH] [xlib] Clear the gc_needs_clip_reset after use. If you think this commit is reminiscent of 40558cb15e5f7276a29847b00c9dae08b9d9380e, you would be right as it fixes exactly the same bug I made then and reintroduced in dc714106e156cb7901. So quoting 40558cb: 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. --- src/cairo-xlib-screen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c index c456b1657..60421cdab 100644 --- a/src/cairo-xlib-screen.c +++ b/src/cairo-xlib-screen.c @@ -400,6 +400,7 @@ _cairo_xlib_screen_get_gc (cairo_xlib_screen_info_t *info, int depth) gc = info->gc[depth]; info->gc[depth] = NULL; needs_reset = info->gc_needs_clip_reset & (1 << depth); + info->gc_needs_clip_reset &= ~(1 << depth); CAIRO_MUTEX_UNLOCK (info->mutex); if (needs_reset)