aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-10-30 20:46:02 +0000
committerGerd Moellmann2000-10-30 20:46:02 +0000
commit563f68f11b4d75804e6500f86896bdb34b6d703c (patch)
treec6d70f5abbed294f06de8249d957f1df0675ef7c /src
parent234be340d871b2e5d069bc53ec04fbe276f3e8f8 (diff)
downloademacs-563f68f11b4d75804e6500f86896bdb34b6d703c.tar.gz
emacs-563f68f11b4d75804e6500f86896bdb34b6d703c.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xfaces.c24
2 files changed, 30 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8a12115d442..93a5ae1ad42 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
12000-10-30 Gerd Moellmann <gerd@gnu.org> 12000-10-30 Gerd Moellmann <gerd@gnu.org>
2 2
3 * xfaces.c (menu_face_change_count): New variable.
4 (Finternal_set_lisp_face_attribute): Increment it for changes
5 of the `menu' face.
6 (realize_basic_faces): Reflect changes in the `menu' faces
7 in menu bars.
8
3 * xdisp.c (try_scrolling) <PT >= scroll_margin_pos>: Add 1 to the 9 * xdisp.c (try_scrolling) <PT >= scroll_margin_pos>: Add 1 to the
4 dy obtained from the iterator's y-position after moving from 10 dy obtained from the iterator's y-position after moving from
5 scroll_margin_pos to PT; see comment there. 11 scroll_margin_pos to PT; see comment there.
diff --git a/src/xfaces.c b/src/xfaces.c
index 2edbe148cb2..b88f037209e 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -445,6 +445,10 @@ static int clear_font_table_count;
445 445
446int face_change_count; 446int face_change_count;
447 447
448/* Incremented for every change in the `menu' face. */
449
450int menu_face_change_count;
451
448/* Non-zero means don't display bold text if a face's foreground 452/* Non-zero means don't display bold text if a face's foreground
449 and background colors are the inverse of the default colors of the 453 and background colors are the inverse of the default colors of the
450 display. This is a kluge to suppress `bold black' foreground text 454 display. This is a kluge to suppress `bold black' foreground text
@@ -4033,6 +4037,8 @@ FRAME 0 means change the face on all frames, and change the default\n\
4033 if (EQ (attr, QCbackground)) 4037 if (EQ (attr, QCbackground))
4034 param = Qmouse_color; 4038 param = Qmouse_color;
4035 } 4039 }
4040 else if (EQ (face, Qmenu))
4041 ++menu_face_change_count;
4036 4042
4037 if (!NILP (param)) 4043 if (!NILP (param))
4038 { 4044 {
@@ -4444,12 +4450,14 @@ x_set_menu_resources_from_menu_face (f, widget)
4444 if (f->face_cache->used == 0) 4450 if (f->face_cache->used == 0)
4445 recompute_basic_faces (f); 4451 recompute_basic_faces (f);
4446 4452
4453 BLOCK_INPUT;
4447#ifdef USE_LUCID 4454#ifdef USE_LUCID
4448 xl_set_menu_resources_from_menu_face (f, widget); 4455 xl_set_menu_resources_from_menu_face (f, widget);
4449#endif 4456#endif
4450#ifdef USE_MOTIF 4457#ifdef USE_MOTIF
4451 xm_set_menu_resources_from_menu_face (f, widget); 4458 xm_set_menu_resources_from_menu_face (f, widget);
4452#endif 4459#endif
4460 UNBLOCK_INPUT;
4453} 4461}
4454 4462
4455#endif /* USE_X_TOOLKIT */ 4463#endif /* USE_X_TOOLKIT */
@@ -5939,6 +5947,22 @@ realize_basic_faces (f)
5939 realize_named_face (f, Qcursor, CURSOR_FACE_ID); 5947 realize_named_face (f, Qcursor, CURSOR_FACE_ID);
5940 realize_named_face (f, Qmouse, MOUSE_FACE_ID); 5948 realize_named_face (f, Qmouse, MOUSE_FACE_ID);
5941 realize_named_face (f, Qmenu, MENU_FACE_ID); 5949 realize_named_face (f, Qmenu, MENU_FACE_ID);
5950
5951 /* Reflext changes in the `menu' face in menu bars. */
5952 if (menu_face_change_count)
5953 {
5954 menu_face_change_count = 0;
5955
5956#ifdef USE_X_TOOLKIT
5957 if (FRAME_X_P (f))
5958 {
5959 Widget menu = f->output_data.x->menubar_widget;
5960 if (menu)
5961 x_set_menu_resources_from_menu_face (f, menu);
5962 }
5963#endif /* USE_X_TOOLKIT */
5964 }
5965
5942 success_p = 1; 5966 success_p = 1;
5943 } 5967 }
5944 5968