diff lwlib/xlwmenu.c @ 373:6240c7796c7a r21-2b2

Import from CVS: tag r21-2b2
author cvs
date Mon, 13 Aug 2007 11:04:06 +0200
parents cc15677e0335
children 8626e4521993
line wrap: on
line diff
--- a/lwlib/xlwmenu.c	Mon Aug 13 11:03:09 2007 +0200
+++ b/lwlib/xlwmenu.c	Mon Aug 13 11:04:06 2007 +0200
@@ -444,6 +444,7 @@
   newstring = XmStringLtoRCreate (newchars, XmFONTLIST_DEFAULT_TAG);
   XmStringExtent (mw->menu.font_list, newstring, &width, &height);
   XmStringFree (newstring);
+  XtFree (chars);
   return width;
 #else
 # ifdef USE_XFONTSET
@@ -891,6 +892,9 @@
       }
   }
   x += string_draw_range (mw, window, x, y, gc, chars, s, i);
+#ifdef NEED_MOTIF
+  XtFree (chars);
+#endif
 }
 
 static void
@@ -2803,13 +2807,31 @@
   xgcv.fill_style = FillOpaqueStippled;
   xgcv.foreground = mw->menu.top_shadow_color;
   xgcv.background = mw->core.background_pixel;
+/*  xgcv.stipple = mw->menu.top_shadow_pixmap; gtb */
+#ifdef NEED_MOTIF
+  if (mw->menu.top_shadow_pixmap &&
+      mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
+     xgcv.stipple = mw->menu.top_shadow_pixmap;
+  else
+     xgcv.stipple = 0;
+#else
   xgcv.stipple = mw->menu.top_shadow_pixmap;
+#endif /* NEED_MOTIF */
   pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0);
   mw->menu.shadow_top_gc =
     XtGetGC((Widget)mw, GCForeground|GCBackground|pm, &xgcv);
 
   xgcv.foreground = mw->menu.bottom_shadow_color;
+/*  xgcv.stipple = mw->menu.bottom_shadow_pixmap; gtb */
+#ifdef NEED_MOTIF
+  if (mw->menu.top_shadow_pixmap &&
+      mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
+     xgcv.stipple = mw->menu.bottom_shadow_pixmap;
+  else
+     xgcv.stipple = 0;
+#else
   xgcv.stipple = mw->menu.bottom_shadow_pixmap;
+#endif /* NEED_MOTIF */
   pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0);
   mw->menu.shadow_bottom_gc =
     XtGetGC ((Widget)mw, GCForeground|GCBackground|pm, &xgcv);