[comp.windows.x] xsetroot bug

tsf@theory.cs.cmu.edu (Timothy Freeman) (06/03/87)

Calling "xsetroot -solid green" loses.  Here's the rcsid of the broken
version:

static char *rcsid_xsetroot_c = "$Header: xsetroot.c,v 10.8 86/02/01 16:16:52 tony Rel $";

and gere are the diffs between the broken version and the fixed
version I made:

***************
*** 230,237
  	    XGetHardwareColor(&color_def)
  	) fg = color_def.pixel;
      }
!     else if (solid_name && strcmp(fg_name, "black") == 0) fg = BlackPixel;
!     else if (solid_name && strcmp(fg_name, "white") == 0) fg = WhitePixel;
  
      if ((DisplayCells() > 2) && (bg_name != NULL)) {
  	if (

--- 230,237 -----
  	    XGetHardwareColor(&color_def)
  	) fg = color_def.pixel;
      }
!     else if (fg_name && strcmp(fg_name, "black") == 0) fg = BlackPixel;
!     else if (fg_name && strcmp(fg_name, "white") == 0) fg = WhitePixel;
  
      if ((DisplayCells() > 2) && (bg_name != NULL)) {
  	if (
-- 
Tim Freeman

Arpanet: tsf@theory.cs.cmu.edu
Uucp:    ...!seismo!theory.cs.cmu.edu!tsf