[gnu.emacs.bug] X11 mouse color management bug for monocrome screens

anton%con.Berkeley.EDU@BERKELEY.EDU (Jeff Anton) (05/29/89)

Since 18.51 mouse color for monocrome X11 screens has not let the user
change the mouse color nor would the mouse color change as a result
of (x-flip-color).  Here are context diffs of x11fns.c and x11term.c
					Jeff Anton
*** x11fns.c.org	Fri Feb 24 03:36:01 1989
--- x11fns.c	Sun May 28 14:39:05 1989
***************
*** 340,353 ****
  x_set_cursor_colors ()
  {
    XColor forec, backc;
  
!   if (XXisColor && mous_color
!       && XParseColor (XXdisplay, XXColorMap, mous_color, &forec)
!       && XParseColor (XXdisplay, XXColorMap, back_color, &backc))
      {
!       XRecolorCursor (XXdisplay, EmacsCursor, &forec, &backc);
!       return 1;
      }
    else return 0;
  }
  
--- 340,366 ----
  x_set_cursor_colors ()
  {
    XColor forec, backc;
+   char	 *useback;
  
!   useback = back_color;
!   if (!XXisColor && !strcmp(mous_color, back_color))
!   {
!     if (strcmp(back_color, "white"))
      {
!       useback = "white";
      }
+     else
+     {
+       useback = "black";
+     }
+   }
+   if (mous_color
+     && XParseColor (XXdisplay, XXColorMap, mous_color, &forec)
+     && XParseColor (XXdisplay, XXColorMap, useback, &backc))
+   {
+     XRecolorCursor (XXdisplay, EmacsCursor, &forec, &backc);
+     return 1;
+   }
    else return 0;
  }
  
*** x11term.c.org	Thu Apr  6 10:45:19 1989
--- x11term.c	Sun May 28 13:01:34 1989
***************
*** 2006,2011 ****
--- 2006,2016 ----
  	XXgc_norm = XXgc_rev;
  	XXgc_rev = XXgc_temp;
  
+ 	if (!strcmp (mous_color, "white"))
+ 	  mous_color = "black";
+ 	else if (!strcmp (mous_color, "black"))
+ 	  mous_color = "white";
+ 
  	x_set_cursor_colors ();
  
  	XRedrawDisplay ();
***************
*** 2019,2029 ****
  			curs_color = "white";
  		}
  	XSetState (XXdisplay, XXgc_curs, back, curs, GXinvert, AllPlanes);
- 
- 	if (!strcmp (mous_color, "white"))
- 	  mous_color = "black";
- 	else if (!strcmp (mous_color, "black"))
- 	  mous_color = "white";
  
  	CursorToggle ();
  	XFlush (XXdisplay);
--- 2024,2029 ----