Index: lwlib/xlwmenu.c =================================================================== RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwmenu.c,v retrieving revision 1.37.2.3 diff -u -r1.37.2.3 xlwmenu.c --- lwlib/xlwmenu.c 6 Sep 2005 08:24:48 -0000 1.37.2.3 +++ lwlib/xlwmenu.c 22 Sep 2005 20:04:25 -0000 @@ -74,7 +74,7 @@ static XtResource xlwMenuResources[] = { -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) /* There are three font list resources, so that we can accept either of the resources *fontList: or *font:, and so that we can tell the difference between them being specified, and being defaulted to a @@ -175,7 +175,7 @@ static void Drag (Widget w, XEvent *ev, String *params, Cardinal *num_params); static void Select(Widget w, XEvent *ev, String *params, Cardinal *num_params); -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) static XFontStruct *default_font_of_font_list (XmFontList); #endif @@ -314,14 +314,14 @@ /* Size code */ static int string_width (XlwMenuWidget mw, -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) XmString s #else char *s #endif ) { -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) Dimension width, height; XmStringExtent (mw->menu.font_list, s, &width, &height); return width; @@ -368,14 +368,14 @@ static int string_width_u (XlwMenuWidget mw, -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) XmString string #else char *string #endif ) { -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) Dimension width, height; XmString newstring; #else @@ -395,7 +395,7 @@ char *chars; int i, j; -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) chars = ""; if (!XmStringGetLtoR (string, XmFONTLIST_DEFAULT_TAG, &chars)) chars = ""; @@ -412,7 +412,7 @@ newchars[j++] = chars[i]; newchars[j] = '\0'; -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) newstring = XmStringLtoRCreate (newchars, XmFONTLIST_DEFAULT_TAG); XmStringExtent (mw->menu.font_list, newstring, &width, &height); XmStringFree (newstring); @@ -597,7 +597,7 @@ return result; } -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) static XmString resource_widget_value (XlwMenuWidget mw, widget_value *val) @@ -772,14 +772,14 @@ #else GC gc, #endif -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) XmString string #else char *string #endif ) { -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) XmStringDraw (XtDisplay (mw), window, mw->menu.font_list, string, gc, @@ -832,7 +832,7 @@ int end ) { -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) Dimension width, height; XmString newstring; int c; @@ -926,7 +926,7 @@ #else GC gc, #endif -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) XmString string #else char *string @@ -936,7 +936,7 @@ int i, s = 0; char *chars; -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) chars = ""; if (!XmStringGetLtoR (string, XmFONTLIST_DEFAULT_TAG, &chars)) chars = ""; @@ -969,7 +969,7 @@ #else x += string_draw_range (mw, window, x, y, gc, chars, s, i); #endif -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) XtFree (chars); #endif } @@ -984,7 +984,7 @@ #endif char *value) { -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) XmString xm_value = XmStringCreateLtoR(value, XmSTRING_DEFAULT_CHARSET); string_draw (mw, w, x, y, gc, xm_value); XmStringFree (xm_value); @@ -1708,7 +1708,7 @@ if (!in_menubar && val->key) { int w; -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) XmString key = XmStringCreateLtoR (val->key, XmSTRING_DEFAULT_CHARSET); w = string_width (mw, key); XmStringFree (key); @@ -2796,7 +2796,7 @@ unsigned long flags = (GCFont | GCForeground | GCBackground); #endif -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) xgcv.font = default_font_of_font_list (mw->menu.font_list)->fid; #else #ifndef USE_XFT_MENUBARS @@ -3047,7 +3047,7 @@ static void extract_font_extents (XlwMenuWidget mw) { -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) /* Find the maximal ascent/descent of the fonts in the font list so that all menu items can be the same height... */ mw->menu.font_ascent = 0; @@ -3143,7 +3143,7 @@ #endif /* NEED_MOTIF */ } -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) static XFontStruct * default_font_of_font_list (XmFontList font_list) { @@ -3213,7 +3213,7 @@ XCreatePixmapFromBitmapData (display, window, (char *) gray_bits, gray_width, gray_height, 1, 0, 1); -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) /* #### Even if it's a kludge!!!, we should consider doing the same for X Font Sets. */ /* The menu.font_list slot came from the *fontList resource (Motif standard.) @@ -3385,7 +3385,7 @@ if (newmw->core.background_pixel != oldmw->core.background_pixel || newmw->menu.foreground != oldmw->menu.foreground /* For the XEditResource protocol, which may want to change the font. */ -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) || newmw->menu.font_list != oldmw->menu.font_list || newmw->menu.font_list_2 != oldmw->menu.font_list_2 || newmw->menu.fallback_font_list != oldmw->menu.fallback_font_list Index: lwlib/xlwmenuP.h =================================================================== RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwmenuP.h,v retrieving revision 1.4.20.2 diff -u -r1.4.20.2 xlwmenuP.h --- lwlib/xlwmenuP.h 10 Dec 2004 06:43:26 -0000 1.4.20.2 +++ lwlib/xlwmenuP.h 22 Sep 2005 20:04:25 -0000 @@ -27,7 +27,7 @@ { /* slots set by the resources */ -#ifdef NEED_MOTIF +#if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS) XmFontList font_list; XmFontList font_list_2; XmFontList fallback_font_list;