mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 21:00:10 +01:00
[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:
parent
abba3f2375
commit
40558cb15e
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue