[xlib] Clear the gc_needs_clip_reset after use.

If you think this commit is reminiscent of
40558cb15e, you would be right as it fixes
exactly the same bug I made then and reintroduced in dc714106e1.

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.
This commit is contained in:
Chris Wilson 2008-04-11 23:47:07 +01:00
parent 28a1dabed8
commit ff5376563b

View file

@ -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)