comparison src/xfaces.c @ 3583:0bc9838eb0bb

* xfaces.c (init_frame_faces): Remove assumption that the selected frame must be an X frame whenever there is already an X frame.
author Jim Blandy <jimb@redhat.com>
date Wed, 09 Jun 1993 04:36:41 +0000
parents aad9fd004281
children 48b1ef149180
comparison
equal deleted inserted replaced
3582:eb75df1104eb 3583:0bc9838eb0bb
463 ensure_face_ready (f, 0); 463 ensure_face_ready (f, 0);
464 ensure_face_ready (f, 1); 464 ensure_face_ready (f, 1);
465 465
466 recompute_basic_faces (f); 466 recompute_basic_faces (f);
467 467
468 /* Supposedly, we only apply this function to newly-created frames. */ 468 /* Find another X frame. */
469 if (selected_frame == f) 469 {
470 abort (); 470 Lisp_Object tail, frame, result;
471 471
472 /* Make sure that all faces valid on the selected frame are also valid 472 result = Qnil;
473 on this new frame. */ 473 FOR_EACH_FRAME (tail, frame)
474 if (FRAME_X_P (selected_frame)) 474 if (FRAME_X_P (XFRAME (frame))
475 { 475 && XFRAME (frame) != f)
476 int i; 476 {
477 int n_faces = selected_frame->display.x->n_faces; 477 result = frame;
478 struct face **faces = selected_frame->display.x->faces; 478 break;
479 479 }
480 for (i = 2; i < n_faces; i++) 480
481 if (faces[i]) 481 /* If we didn't find any X frames other than f, then we don't need
482 ensure_face_ready (f, i); 482 any faces other than 0 and 1, so we're okay. Otherwise, make
483 } 483 sure that all faces valid on the selected frame are also valid
484 on this new frame. */
485 if (FRAMEP (result))
486 {
487 int i;
488 int n_faces = XFRAME (result)->display.x->n_faces;
489 struct face **faces = XFRAME (result)->display.x->faces;
490
491 for (i = 2; i < n_faces; i++)
492 if (faces[i])
493 ensure_face_ready (f, i);
494 }
495 }
484 } 496 }
485 497
486 498
487 /* Called from Fdelete_frame. */ 499 /* Called from Fdelete_frame. */
488 void 500 void