From: Richard M. Stallman Date: Tue, 21 Nov 1995 21:12:43 +0000 (+0000) Subject: (unload_color, unload_font): Never invalidate computed faces 0 and 1. X-Git-Tag: emacs-19.34~2238 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f3400cf9664f2b68dafa05d0aefcfc1007fc4351;p=emacs.git (unload_color, unload_font): Never invalidate computed faces 0 and 1. --- diff --git a/src/xfaces.c b/src/xfaces.c index 254aaf275f1..738acbd915c 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -339,7 +339,7 @@ unload_font (f, font) 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) @@ -348,6 +348,7 @@ unload_font (f, font) if (face->gc) XFreeGC (dpy, face->gc); face->gc = 0; + /* This marks the computed face as available to reuse. */ face->font = 0; } } @@ -402,7 +403,7 @@ unload_color (f, pixel) 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 @@ -412,6 +413,7 @@ unload_color (f, pixel) if (face->gc) XFreeGC (dpy, face->gc); face->gc = 0; + /* This marks the computed face as available to reuse. */ face->font = 0; } }