diff options
| author | Richard M. Stallman | 1995-11-21 21:12:43 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-11-21 21:12:43 +0000 |
| commit | f3400cf9664f2b68dafa05d0aefcfc1007fc4351 (patch) | |
| tree | dc368faef4bfc370e4c41c63797b8cb32d1ab86c /src | |
| parent | 0a812366d68919613124e903cec376101f77c57b (diff) | |
| download | emacs-f3400cf9664f2b68dafa05d0aefcfc1007fc4351.tar.gz emacs-f3400cf9664f2b68dafa05d0aefcfc1007fc4351.zip | |
(unload_color, unload_font): Never invalidate computed faces 0 and 1.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) | |||
| 339 | BLOCK_INPUT; | 339 | BLOCK_INPUT; |
| 340 | /* Invalidate any computed faces which use this font, | 340 | /* Invalidate any computed faces which use this font, |
| 341 | and free their GC's if they have any. */ | 341 | and free their GC's if they have any. */ |
| 342 | for (i = 0; i < len; i++) | 342 | for (i = 2; i < len; i++) |
| 343 | { | 343 | { |
| 344 | struct face *face = FRAME_COMPUTED_FACES (f)[i]; | 344 | struct face *face = FRAME_COMPUTED_FACES (f)[i]; |
| 345 | if (face->font == font) | 345 | if (face->font == font) |
| @@ -348,6 +348,7 @@ unload_font (f, font) | |||
| 348 | if (face->gc) | 348 | if (face->gc) |
| 349 | XFreeGC (dpy, face->gc); | 349 | XFreeGC (dpy, face->gc); |
| 350 | face->gc = 0; | 350 | face->gc = 0; |
| 351 | /* This marks the computed face as available to reuse. */ | ||
| 351 | face->font = 0; | 352 | face->font = 0; |
| 352 | } | 353 | } |
| 353 | } | 354 | } |
| @@ -402,7 +403,7 @@ unload_color (f, pixel) | |||
| 402 | BLOCK_INPUT; | 403 | BLOCK_INPUT; |
| 403 | /* Invalidate any computed faces which use this color, | 404 | /* Invalidate any computed faces which use this color, |
| 404 | and free their GC's if they have any. */ | 405 | and free their GC's if they have any. */ |
| 405 | for (i = 0; i < len; i++) | 406 | for (i = 2; i < len; i++) |
| 406 | { | 407 | { |
| 407 | struct face *face = FRAME_COMPUTED_FACES (f)[i]; | 408 | struct face *face = FRAME_COMPUTED_FACES (f)[i]; |
| 408 | if (face->foreground == pixel | 409 | if (face->foreground == pixel |
| @@ -412,6 +413,7 @@ unload_color (f, pixel) | |||
| 412 | if (face->gc) | 413 | if (face->gc) |
| 413 | XFreeGC (dpy, face->gc); | 414 | XFreeGC (dpy, face->gc); |
| 414 | face->gc = 0; | 415 | face->gc = 0; |
| 416 | /* This marks the computed face as available to reuse. */ | ||
| 415 | face->font = 0; | 417 | face->font = 0; |
| 416 | } | 418 | } |
| 417 | } | 419 | } |