}
/*-------------------------- GC and Pixel allocation --------------------*/
+#ifndef XmUNSPECIFIED_PIXMAP
+#define XmUNSPECIFIED_PIXMAP 2
+#endif
+
static GC
get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm)
{
values.background = bg;
values.fill_style = FillOpaqueStippled;
values.stipple = pm;
+/* mask = GCForeground | GCBackground |
+ (pm == None ? 0 : GCStipple | GCFillStyle); gtb */
+ if (pm != None && pm != 0 && pm != XmUNSPECIFIED_PIXMAP)
+ values.stipple = pm;
+ else
+ values.stipple = None;
mask = GCForeground | GCBackground |
- (pm == None ? 0 : GCStipple | GCFillStyle);
+ (values.stipple == None ? 0 : GCStipple | GCFillStyle);
+
return XtGetGC((Widget) w, mask, &values);
}
if (ss < SS_MIN)
{
/* add a percent amount for integer rounding */
- float tmp = ((((float) (SS_MIN - ss) * (float) value)) / total) + 0.5;
+ float tmp = (((float) (SS_MIN - ss) * (float) value) / total) + 0.5;
above -= (int) tmp;
ss = SS_MIN;