summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-05-12 10:10:49 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2007-05-12 10:11:46 +0100
commit40558cb15e5f7276a29847b00c9dae08b9d9380e (patch)
tree090a4f8441211a1d7865a260e848b4088663a844
parentabba3f2375c58401b7722837b3be37c3de9beca4 (diff)
[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)
-rw-r--r--src/cairo-xlib-screen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c
index 4ff3b8a47..f75774206 100644
--- a/src/cairo-xlib-screen.c
+++ b/src/cairo-xlib-screen.c
@@ -384,8 +384,10 @@ _cairo_xlib_screen_get_gc (cairo_xlib_screen_info_t *info, int depth)
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;
}