# HG changeset patch # User Gerd Moellmann # Date 972938718 0 # Node ID 5ab6f3e1f5c8e7f0965a95f4bc0594fdd481455f # Parent 91435f3e0675a765246ec51989722687060c1374 (menu_face_change_count): New variable. (Finternal_set_lisp_face_attribute): Increment it for changes of the `menu' face. (realize_basic_faces): Reflect changes in the `menu' faces in menu bars. diff -r 91435f3e0675 -r 5ab6f3e1f5c8 src/xfaces.c --- a/src/xfaces.c Mon Oct 30 19:59:09 2000 +0000 +++ b/src/xfaces.c Mon Oct 30 20:45:18 2000 +0000 @@ -445,6 +445,10 @@ int face_change_count; +/* Incremented for every change in the `menu' face. */ + +int menu_face_change_count; + /* Non-zero means don't display bold text if a face's foreground and background colors are the inverse of the default colors of the display. This is a kluge to suppress `bold black' foreground text @@ -4033,6 +4037,8 @@ if (EQ (attr, QCbackground)) param = Qmouse_color; } + else if (EQ (face, Qmenu)) + ++menu_face_change_count; if (!NILP (param)) { @@ -4444,12 +4450,14 @@ if (f->face_cache->used == 0) recompute_basic_faces (f); + BLOCK_INPUT; #ifdef USE_LUCID xl_set_menu_resources_from_menu_face (f, widget); #endif #ifdef USE_MOTIF xm_set_menu_resources_from_menu_face (f, widget); #endif + UNBLOCK_INPUT; } #endif /* USE_X_TOOLKIT */ @@ -5939,6 +5947,22 @@ realize_named_face (f, Qcursor, CURSOR_FACE_ID); realize_named_face (f, Qmouse, MOUSE_FACE_ID); realize_named_face (f, Qmenu, MENU_FACE_ID); + + /* Reflext changes in the `menu' face in menu bars. */ + if (menu_face_change_count) + { + menu_face_change_count = 0; + +#ifdef USE_X_TOOLKIT + if (FRAME_X_P (f)) + { + Widget menu = f->output_data.x->menubar_widget; + if (menu) + x_set_menu_resources_from_menu_face (f, menu); + } +#endif /* USE_X_TOOLKIT */ + } + success_p = 1; }