aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-29 23:25:10 +0000
committerRichard M. Stallman1994-10-29 23:25:10 +0000
commit47d52240aaa01f48adc6e07ed8ea3b4c023435af (patch)
treeea66189787886a6127ed0fb61b26f2b1ed880c84
parentf3e59d5e1aeab604997c5064503ac4cd0c3aa03f (diff)
downloademacs-47d52240aaa01f48adc6e07ed8ea3b4c023435af.tar.gz
emacs-47d52240aaa01f48adc6e07ed8ea3b4c023435af.zip
(xlwmenu_default_font): New global variable.
(XlwMenuInitialize): Use xlwmenu_default_font to default the font if necessary. Make mw, itself, an argument.
-rw-r--r--lwlib/xlwmenu.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index d06321257f9..a6e46584d65 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -33,6 +33,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
33static int pointer_grabbed; 33static int pointer_grabbed;
34static XEvent menu_post_event; 34static XEvent menu_post_event;
35 35
36XFontStruct *xlwmenu_default_font;
37
36static char 38static char
37xlwMenuTranslations [] = 39xlwMenuTranslations [] =
38"<BtnDown>: start()\n\ 40"<BtnDown>: start()\n\
@@ -1059,15 +1061,13 @@ release_shadow_gcs (mw)
1059} 1061}
1060 1062
1061static void 1063static void
1062XlwMenuInitialize (request, new, args, num_args) 1064XlwMenuInitialize (request, mw, args, num_args)
1063 Widget request; 1065 Widget request;
1064 Widget new; 1066 XlwMenuWidget mw;
1065 ArgList args; 1067 ArgList args;
1066 Cardinal *num_args; 1068 Cardinal *num_args;
1067{ 1069{
1068 /* Get the GCs and the widget size */ 1070 /* Get the GCs and the widget size */
1069 XlwMenuWidget mw = (XlwMenuWidget)new;
1070
1071 XSetWindowAttributes xswa; 1071 XSetWindowAttributes xswa;
1072 int mask; 1072 int mask;
1073 1073
@@ -1090,6 +1090,12 @@ XlwMenuInitialize (request, new, args, num_args)
1090 gray_bits, gray_width, 1090 gray_bits, gray_width,
1091 gray_height, 1, 0, 1); 1091 gray_height, 1, 0, 1);
1092 1092
1093 /* I don't understand why this ends up 0 sometimes,
1094 but it does. This kludge works around it.
1095 Can anyone find a real fix? -- rms. */
1096 if (mw->menu.font == 0)
1097 mw->menu.font = xlwmenu_default_font;
1098
1093 make_drawing_gcs (mw); 1099 make_drawing_gcs (mw);
1094 make_shadow_gcs (mw); 1100 make_shadow_gcs (mw);
1095 1101