BLOCK_INPUT;
/* Invalidate any computed faces which use this font,
and free their GC's if they have any. */
- for (i = 0; i < len; i++)
+ for (i = 2; i < len; i++)
{
struct face *face = FRAME_COMPUTED_FACES (f)[i];
if (face->font == font)
if (face->gc)
XFreeGC (dpy, face->gc);
face->gc = 0;
+ /* This marks the computed face as available to reuse. */
face->font = 0;
}
}
BLOCK_INPUT;
/* Invalidate any computed faces which use this color,
and free their GC's if they have any. */
- for (i = 0; i < len; i++)
+ for (i = 2; i < len; i++)
{
struct face *face = FRAME_COMPUTED_FACES (f)[i];
if (face->foreground == pixel
if (face->gc)
XFreeGC (dpy, face->gc);
face->gc = 0;
+ /* This marks the computed face as available to reuse. */
face->font = 0;
}
}