# HG changeset patch # User Richard M. Stallman # Date 783473110 0 # Node ID 49e984bf66892009429ac550a501fe56ddcd79ad # Parent 129ec4acc4ff747a06c5319818059a54acb43d0a (xlwmenu_default_font): New global variable. (XlwMenuInitialize): Use xlwmenu_default_font to default the font if necessary. Make mw, itself, an argument. diff -r 129ec4acc4ff -r 49e984bf6689 lwlib/xlwmenu.c --- a/lwlib/xlwmenu.c Sat Oct 29 18:33:48 1994 +0000 +++ b/lwlib/xlwmenu.c Sat Oct 29 23:25:10 1994 +0000 @@ -33,6 +33,8 @@ static int pointer_grabbed; static XEvent menu_post_event; +XFontStruct *xlwmenu_default_font; + static char xlwMenuTranslations [] = ": start()\n\ @@ -1059,15 +1061,13 @@ } static void -XlwMenuInitialize (request, new, args, num_args) +XlwMenuInitialize (request, mw, args, num_args) Widget request; - Widget new; + XlwMenuWidget mw; ArgList args; Cardinal *num_args; { /* Get the GCs and the widget size */ - XlwMenuWidget mw = (XlwMenuWidget)new; - XSetWindowAttributes xswa; int mask; @@ -1090,6 +1090,12 @@ gray_bits, gray_width, gray_height, 1, 0, 1); + /* I don't understand why this ends up 0 sometimes, + but it does. This kludge works around it. + Can anyone find a real fix? -- rms. */ + if (mw->menu.font == 0) + mw->menu.font = xlwmenu_default_font; + make_drawing_gcs (mw); make_shadow_gcs (mw);