X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lwlib%2Fxlwscrollbar.c;h=88f7cc1d0d4268fcdd4886fd0f9e127047bbe510;hp=e8ded5a5fa34bedadb819913ee4dcb88c413a75f;hb=46f51e794ddb493a8a76ec2f3be00b41e3b0be22;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910 diff --git a/lwlib/xlwscrollbar.c b/lwlib/xlwscrollbar.c index e8ded5a..88f7cc1 100644 --- a/lwlib/xlwscrollbar.c +++ b/lwlib/xlwscrollbar.c @@ -485,6 +485,12 @@ arrow_same_end (XlwScrollBarWidget w) } /*-------------------------- 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 @@ 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 */ +#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); } @@ -962,7 +979,7 @@ seg_pixel_sizes (XlwScrollBarWidget w, int *above_return, 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;