diff lwlib/xlwscrollbar.c @ 318:afd57c14dfc8 r21-0b57

Import from CVS: tag r21-0b57
author cvs
date Mon, 13 Aug 2007 10:45:36 +0200
parents c5d627a313b1
children 7347b34c275b
line wrap: on
line diff
--- a/lwlib/xlwscrollbar.c	Mon Aug 13 10:44:47 2007 +0200
+++ b/lwlib/xlwscrollbar.c	Mon Aug 13 10:45:36 2007 +0200
@@ -485,6 +485,12 @@
 }
 
 /*-------------------------- GC and Pixel allocation --------------------*/
+#ifdef NEED_MOTIF
+#ifndef XmUNSPECIFIED_PIXMAP
+#define XmUNSPECIFIED_PIXMAP 2
+#endif
+#endif /* NEED_MOTIF */
+
 static GC
 get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm)
 {
@@ -506,8 +512,19 @@
   values.background = bg;
   values.fill_style = FillOpaqueStippled;
   values.stipple    = pm;
+/*  mask = GCForeground | GCBackground |
+    (pm == None ? 0 : GCStipple | GCFillStyle); gtb */
+#ifdef NEED_MOTIF
+  if (pm != None && pm != 0 && pm != XmUNSPECIFIED_PIXMAP)
+     values.stipple = pm;
+  else
+     values.stipple = None;
+#else
+  values.stipple = pm;
+#endif /* NEED_MOTIF */
   mask = GCForeground | GCBackground |
-    (pm == None ? 0 : GCStipple | GCFillStyle);
+   (values.stipple == None ? 0 : GCStipple | GCFillStyle);
+
   return XtGetGC((Widget) w, mask, &values);
 }