diff options
| author | Jim Blandy | 1993-05-30 18:12:11 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-05-30 18:12:11 +0000 |
| commit | 7b37f67b57515969ac0b3861484babe1d42a5845 (patch) | |
| tree | 7f08f00c08a6be1acb1fbf46e8778fed200652e8 /src | |
| parent | 25c08a32eddb9daf6029dade09bb7a97515ff9c9 (diff) | |
| download | emacs-7b37f67b57515969ac0b3861484babe1d42a5845.tar.gz emacs-7b37f67b57515969ac0b3861484babe1d42a5845.zip | |
* xfaces.c (init_frame_faces): We have to make sure that face ID's
are valid on all frames or no frames; make sure F has allocated
faces for any face valid on the selected frame.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index d7594a051e0..4e4d4699990 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -90,7 +90,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 90 | vector). These are called "frame faces". | 90 | vector). These are called "frame faces". |
| 91 | Element 0 is the default face --- the one used for normal text. | 91 | Element 0 is the default face --- the one used for normal text. |
| 92 | Element 1 is the modeline face. | 92 | Element 1 is the modeline face. |
| 93 | These faces have their GC's set; the rest do not. (See src/xterm.h.) | 93 | These faces have their GC's set; the rest do not. |
| 94 | If faces[i] is filled in (i.e. non-zero) on one frame, then it must | ||
| 95 | be filled in on all frames. Code assumes that face ID's can be | ||
| 96 | used on any frame. (See src/xterm.h.) | ||
| 94 | 97 | ||
| 95 | The global variables `face_vector' and `nfaces' define another | 98 | The global variables `face_vector' and `nfaces' define another |
| 96 | array of struct face pointers, with their GC's set. This array | 99 | array of struct face pointers, with their GC's set. This array |
| @@ -457,6 +460,22 @@ init_frame_faces (f) | |||
| 457 | ensure_face_ready (f, 1); | 460 | ensure_face_ready (f, 1); |
| 458 | 461 | ||
| 459 | recompute_basic_faces (f); | 462 | recompute_basic_faces (f); |
| 463 | |||
| 464 | /* Supposedly, we only apply this function to newly-created frames. */ | ||
| 465 | if (selected_frame == f) | ||
| 466 | abort (); | ||
| 467 | |||
| 468 | /* Make sure that all faces valid on the selected frame are also valid | ||
| 469 | on this new frame. */ | ||
| 470 | { | ||
| 471 | int i; | ||
| 472 | int n_faces = selected_frame->display.x->n_faces; | ||
| 473 | struct face **faces = selected_frame->display.x->faces; | ||
| 474 | |||
| 475 | for (i = 2; i < n_faces; i++) | ||
| 476 | if (faces[i]) | ||
| 477 | ensure_face_ready (f, i); | ||
| 478 | } | ||
| 460 | } | 479 | } |
| 461 | 480 | ||
| 462 | 481 | ||