diff lwlib/xlwscrollbar.c @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 2f8bb876ab1d
children
line wrap: on
line diff
--- a/lwlib/xlwscrollbar.c	Mon Aug 13 11:19:22 2007 +0200
+++ b/lwlib/xlwscrollbar.c	Mon Aug 13 11:20:41 2007 +0200
@@ -485,9 +485,11 @@
 }
 
 /*-------------------------- 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)
@@ -512,10 +514,14 @@
   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 |
    (values.stipple == None ? 0 : GCStipple | GCFillStyle);
 
@@ -973,7 +979,7 @@
   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;