changeset 26759:01f067d61668

(x_set_menu_resources_from_menu_face): Make sure basic faces are realized before trying to use face `menu'.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 07 Dec 1999 20:06:40 +0000
parents cbc780bdc2bd
children c55415d59073
files src/xfaces.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Tue Dec 07 20:02:28 1999 +0000
+++ b/src/xfaces.c	Tue Dec 07 20:06:40 1999 +0000
@@ -3988,6 +3988,12 @@
      struct frame *f;
      Widget widget;
 {
+  /* Realized faces may have been removed on frame F, e.g. because of
+     face attribute changes.  Recompute them, if necessary, since we
+     will need the `menu' face.  */
+  if (f->face_cache->used == 0)
+    recompute_basic_faces (f);
+  
 #ifdef USE_LUCID
   xl_set_menu_resources_from_menu_face (f, widget);
 #endif