[comp.windows.x] tiny xterm modification to use solid gray borders

jim@ci-dandelion.UUCP (02/24/87)

Here are two tiny modifications for Ed Moy's xterm to allow it use solid gray
border tiles if possible.  On some tubes pattern fills are MUCH slower than
solid fills, making it very painful to bounce between windows.  Using a solid
tile that can be shared takes care of these situations. 

							Jim Fulton
							Cognition Inc.
                                                        900 Tech Park Drive
UUCP:  ...!{mit-eddie,talcott}!ci-dandelion!jim         Billerica, MA
ARPA:  jim@athena.mit.edu, fulton@eddie.mit.edu         (617) 667-4800


*** /tmp/,RCSt1006633	Tue Feb 24 12:44:24 1987
--- main.c	Tue Feb 24 12:43:19 1987
***************
*** 948,953
  		Error(ERROR_BORDER);
  	} else
  	    screen->bordertile = B_Pixmap;
  	screen->graybordertile = make_gray();
  
  	screen->foreground = B_Pixel;

--- 948,963 -----
  		Error(ERROR_BORDER);
  	} else
  	    screen->bordertile = B_Pixmap;
+ 
+ 
+ /*
+  * This is a pleasant gray that is can be shared and is much faster than
+  * drawing a tile.
+  */
+         if (DisplayCells() > 2 && XParseColor ("#ccb", &cdef) &&
+             XGetHardwareColor (&cdef)) {
+             screen->graybordertile = XMakeTile (cdef.pixel);
+         } else
  	screen->graybordertile = make_gray();
  
  	screen->foreground = B_Pixel;


*** /tmp/,RCSt1007170	Tue Feb 24 14:44:15 1987
--- button.c	Tue Feb 24 14:43:58 1987
***************
*** 702,707
  		extern FontInfo *Menu_DefaultFontInfo;
  
  		inited++;
  		Gray_Tile = screen->graybordertile;
  		InitMenu(xterm_name);
  		Menu_DefaultCursor = screen->arrow;

--- 702,710 -----
  		extern FontInfo *Menu_DefaultFontInfo;
  
  		inited++;
+ 		if (DisplayCells() > 2)
+ 		    Gray_Tile = make_gray ();
+ 		else
  		Gray_Tile = screen->graybordertile;
  		InitMenu(xterm_name);
  		Menu_DefaultCursor = screen->arrow;