diff -Ncr xc/lib/Xaw3d/Imakefile xc-color/lib/Xaw3d/Imakefile
*** xc/lib/Xaw3d/Imakefile	Tue Oct 15 23:41:19 1996
--- xc-color/lib/Xaw3d/Imakefile	Sat Jan 30 08:34:11 1999
***************
*** 40,45 ****
--- 40,46 ----
         LINTLIBS = $(LINTXLIB) $(LINTXTOOL)
  
  #  EXTRA_DEFINES = -DARROW_SCROLLBAR -DUSEGRAY
+    EXTRA_DEFINES += -DUSEGRAY
  
  #  EXTRA_INCLUDES = -I.
  
diff -Ncr xc/lib/Xaw3d/Label.c xc-color/lib/Xaw3d/Label.c
*** xc/lib/Xaw3d/Label.c	Tue Oct 15 23:41:20 1996
--- xc-color/lib/Xaw3d/Label.c	Sat Jan 30 08:33:29 1999
***************
*** 380,385 ****
--- 380,386 ----
  static void GetgrayGC(lw)
      LabelWidget lw;
  {
+ #ifndef USEGRAY
      XGCValues	values;
  
      values.foreground = lw->label.foreground;
***************
*** 406,411 ****
--- 407,461 ----
  					   GCFont | GCTile | GCFillStyle |
  					   GCGraphicsExposures,
  				&values);
+ #else
+     extern unsigned long dimGrayPixel(Display *, Screen *);
+     XGCValues	values;
+ 
+     values.foreground = dimGrayPixel(XtDisplay((Widget)lw), XtScreen((Widget)lw));
+     if (! values.foreground || values.foreground == lw->core.background_pixel) {
+ 	values.foreground = lw->label.foreground;
+ 	values.background = lw->core.background_pixel;
+ 	values.font	      = lw->label.font->fid;
+ 	values.fill_style = FillTiled;
+ 	values.tile       = XmuCreateStippledPixmap(XtScreen((Widget)lw),
+ 						    lw->label.foreground, 
+ 						    lw->core.background_pixel,
+ 						    lw->core.depth);
+ 	values.graphics_exposures = False;
+ 
+ 	lw->label.stipple = values.tile;
+ 	if ( lw->simple.international == True )
+ 	    /* Since Xmb/wcDrawString eats the font, I must use XtAllocateGC. */
+ 	    lw->label.gray_GC = XtAllocateGC((Widget)lw,  0,
+ 					     (unsigned) GCForeground | GCBackground |
+ 					     GCTile | GCFillStyle |
+ 					     GCGraphicsExposures,
+ 					     &values, GCFont, 0);
+ 	else
+ 	    lw->label.gray_GC = XtGetGC((Widget)lw, 
+ 					(unsigned) GCForeground | GCBackground |
+ 					GCFont | GCTile | GCFillStyle |
+ 					GCGraphicsExposures,
+ 					&values);
+     } else {
+ 	values.background = lw->core.background_pixel;
+ 	values.font	  = lw->label.font->fid;
+ 	values.graphics_exposures = False;
+ 
+ 	if ( lw->simple.international == True )
+ 	    /* Since Xmb/wcDrawString eats the font, I must use XtAllocateGC. */
+ 	    lw->label.gray_GC = XtAllocateGC((Widget)lw,  0,
+ 					     (unsigned) GCForeground | GCBackground |
+ 					     GCGraphicsExposures,
+ 					     &values, GCFont, 0);
+ 	else
+ 	    lw->label.gray_GC = XtGetGC((Widget)lw, 
+ 					(unsigned) GCForeground | GCBackground |
+ 					GCFont |
+ 					GCGraphicsExposures,
+ 					&values);
+     }
+ #endif
  }
  
  static void compute_bitmap_offsets (lw)
diff -Ncr xc/lib/Xaw3d/List.c xc-color/lib/Xaw3d/List.c
*** xc/lib/Xaw3d/List.c	Tue Oct 15 23:41:20 1996
--- xc-color/lib/Xaw3d/List.c	Sat Jan 30 08:33:29 1999
***************
*** 182,187 ****
--- 182,191 ----
  static void GetGCs(w)
  Widget w;
  {
+ #ifndef USEGRAY
+ #else
+     extern unsigned long dimGrayPixel(Display *, Screen *);
+ #endif
      XGCValues	values;
      ListWidget lw = (ListWidget) w;    
  
***************
*** 204,209 ****
--- 208,214 ----
          lw->list.revgc = XtGetGC( w, (unsigned) GCForeground | GCFont,
  				 &values);
  
+ #ifndef USEGRAY
      values.tile       = XmuCreateStippledPixmap(XtScreen(w), 
  						lw->list.foreground,
  						lw->core.background_pixel,
***************
*** 216,221 ****
--- 221,250 ----
      else
          lw->list.graygc = XtGetGC( w, (unsigned) GCFont | GCTile | GCFillStyle,
  			      &values);
+ #else
+     values.foreground = dimGrayPixel(XtDisplay((Widget)lw), XtScreen((Widget)lw));
+     if (! values.foreground || values.foreground == lw->core.background_pixel) {
+ 	values.tile       = XmuCreateStippledPixmap(XtScreen(w), 
+ 						    lw->list.foreground,
+ 						    lw->core.background_pixel,
+ 						    lw->core.depth);
+ 	values.fill_style = FillTiled;
+ 
+ 	if ( lw->simple.international == True )
+ 	    lw->list.graygc = XtAllocateGC( w, 0, (unsigned) GCTile | GCFillStyle,
+ 					   &values, GCFont, 0 );
+ 	else
+ 	    lw->list.graygc = XtGetGC( w, (unsigned) GCFont | GCTile | GCFillStyle,
+ 				      &values);
+     } else {
+ 	if ( lw->simple.international == True )
+ 	    lw->list.graygc = XtAllocateGC( w, 0, (unsigned) GCForeground,
+ 					   &values, GCFont, 0 );
+ 	else
+ 	    lw->list.graygc = XtGetGC( w, (unsigned) GCFont | GCForeground,
+ 				      &values);
+     }
+ #endif
  }
  
  
diff -Ncr xc/lib/Xaw3d/Scrollbar.c xc-color/lib/Xaw3d/Scrollbar.c
*** xc/lib/Xaw3d/Scrollbar.c	Tue Oct 15 23:41:21 1996
--- xc-color/lib/Xaw3d/Scrollbar.c	Sat Jan 30 08:33:29 1999
***************
*** 404,410 ****
        newbot = newtop + sbw->scrollbar.min_thumb +
                          2 * sbw->threeD.shadow_width;
      if ( newbot >= floor ) {
! 	newtop = floor-(newbot-newtop)+1;
  	newbot = floor;
      }
  
--- 404,410 ----
        newbot = newtop + sbw->scrollbar.min_thumb +
                          2 * sbw->threeD.shadow_width;
      if ( newbot >= floor ) {
! 	newtop = floor-(newbot-newtop);
  	newbot = floor;
      }
  
***************
*** 1161,1167 ****
      }
  
      if (sbw->scrollbar.top + sbw->scrollbar.shown > 1.0)
!       sbw->scrollbar.top = 1.0 - sbw->scrollbar.shown;
  #ifdef ARROW_SCROLLBAR
      sbw->scrollbar.scroll_mode = 2; /* indicate continuous scroll */
  #endif
--- 1161,1167 ----
      }
  
      if (sbw->scrollbar.top + sbw->scrollbar.shown > 1.0)
!       sbw->scrollbar.top = 1.0 - sbw->scrollbar.shown + 0.0001;
  #ifdef ARROW_SCROLLBAR
      sbw->scrollbar.scroll_mode = 2; /* indicate continuous scroll */
  #endif
diff -Ncr xc/lib/Xaw3d/SmeBSB.c xc-color/lib/Xaw3d/SmeBSB.c
*** xc/lib/Xaw3d/SmeBSB.c	Tue Oct 15 23:41:22 1996
--- xc-color/lib/Xaw3d/SmeBSB.c	Sat Jan 30 08:33:29 1999
***************
*** 652,657 ****
--- 652,661 ----
  CreateGCs(w)
  Widget w;
  {
+ #ifndef USEGRAY
+ #else
+     extern unsigned long dimGrayPixel(Display *, Screen *);
+ #endif
      SmeBSBObject entry = (SmeBSBObject) w;    
      XGCValues values;
      XtGCMask mask, mask_i18n;
***************
*** 674,679 ****
--- 678,684 ----
      else
          entry->sme_bsb.norm_gc = XtGetGC(w, mask, &values);
  
+ #ifndef USEGRAY
      values.fill_style = FillTiled;
      values.tile   = XmuCreateStippledPixmap(XtScreenOfObject(w), 
  					    entry->sme_bsb.foreground,
***************
*** 685,690 ****
--- 690,717 ----
          entry->sme_bsb.norm_gray_gc = XtAllocateGC(w, 0, mask_i18n, &values, GCFont, 0 );
      else
          entry->sme_bsb.norm_gray_gc = XtGetGC(w, mask, &values);
+ #else
+     values.foreground = dimGrayPixel(XtDisplay(w), XtScreen(w));
+     if (! values.foreground || values.foreground == XtParent(w)->core.background_pixel) {
+ 	values.fill_style = FillTiled;
+ 	values.tile   = XmuCreateStippledPixmap(XtScreenOfObject(w), 
+ 						entry->sme_bsb.foreground,
+ 						XtParent(w)->core.background_pixel,
+ 						XtParent(w)->core.depth);
+ 	values.graphics_exposures = FALSE;
+ 	mask |= GCTile | GCFillStyle;
+ 	if ( entry->sme.international == True )
+ 	    entry->sme_bsb.norm_gray_gc = XtAllocateGC(w, 0, mask_i18n, &values, GCFont, 0 );
+ 	else
+ 	    entry->sme_bsb.norm_gray_gc = XtGetGC(w, mask, &values);
+     } else {
+ 	values.graphics_exposures = FALSE;
+ 	if ( entry->sme.international == True )
+ 	    entry->sme_bsb.norm_gray_gc = XtAllocateGC(w, 0, mask_i18n, &values, GCFont, 0 );
+ 	else
+ 	    entry->sme_bsb.norm_gray_gc = XtGetGC(w, mask, &values);
+     }
+ #endif
  
      values.foreground ^= values.background;
      values.background = 0;
diff -Ncr xc/lib/Xaw3d/ThreeD.c xc-color/lib/Xaw3d/ThreeD.c
*** xc/lib/Xaw3d/ThreeD.c	Tue Oct 15 23:41:24 1996
--- xc-color/lib/Xaw3d/ThreeD.c	Sat Jan 30 08:33:29 1999
***************
*** 135,140 ****
--- 135,161 ----
  
  #ifdef USEGRAY
  #include <stdio.h>
+ unsigned long dimGrayPixel(dpy, scn)
+ Display *dpy;
+ Screen	*scn;
+     {
+     static XColor Gray = 
+     {
+ 	/* pixel */            0, 
+ 	/* red, green, blue */ 0,0,0, 
+         /* flags */            0,
+         /* pad */              0
+     };
+     if (!Gray.pixel)
+ 	{
+ 	XColor exact;
+ 	if (! DefaultColormapOfScreen (scn)
+ 	    || ! XAllocNamedColor(dpy, DefaultColormapOfScreen (scn), 
+ 				  "gray50", &Gray, &exact))
+ 	    Gray.pixel = 0;
+ 	}
+     return Gray.pixel;
+     }
  unsigned long grayPixel(dpy, scn)
  Display *dpy;
  Screen	*scn;
***************
*** 149,156 ****
      if (!Gray.pixel)
  	{
  	XColor exact;
! 	(void) XAllocNamedColor(dpy, DefaultColormapOfScreen (scn), 
! 				"gray", &Gray,&exact);  /* Blindflug */
  	}
      return Gray.pixel;
      }
--- 170,179 ----
      if (!Gray.pixel)
  	{
  	XColor exact;
! 	if (! DefaultColormapOfScreen (scn)
! 	    || ! XAllocNamedColor(dpy, DefaultColormapOfScreen (scn), 
! 				  "gray50", &Gray, &exact))
! 	    Gray.pixel = 0;
  	}
      return Gray.pixel;
      }
