[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)
This commit is contained in:
Chris Wilson 2007-05-12 10:10:49 +01:00
parent abba3f2375
commit 40558cb15e

View file

@ -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;
}