🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #25519

Xterm 6.6B bug fix

#25519
From: Timothy Freeman
Date: Sat, 02 May 1987 19:32
54 lines
2422 bytes
I sent this message to xpert, but it never appeared here...

Version 6.6B of xterm as distributed in mod.sources has some problems
with positioning icons.  It is possible to get xterm to put its icon
off of the screen and the icon-positioning parameter to xterm only
approximately works.  Here is the fix.  Fixes for these problems were
posted to xpert, but I guess they didn't make it into the version that
got sent to mod.sources.

*** charprocold.c	Wed Apr 29 19:21:01 1987
--- charprocnew.c	Wed Apr 29 19:21:03 1987
***************
*** 1668,1673
  
  	SetIconSize( screen );		/* requires max_col, max_row */
  
  	/* allocate memory for screen buffer (including one for status line */
  	screen->buf = screen->allbuf = (ScrnBuf) Allocate (screen->max_row + 2,
  					  screen->max_col +1);

--- 1668,1689 -----
  
  	SetIconSize( screen );		/* requires max_col, max_row */
  
+ 	IconGeometry(screen, &x, &y);
+ /* This bug fix is due to John M. Sellens from Waterloo.  (But don't */
+  /* blame him if its wrong, because Tim Freeman at Carnegie-Mellon */
+  /* modified it.)*/
+ 	/* no matter what they ask for, don't let them set the location
+ 	   for the icon off the screen */
+ 	if ( x <= -screen->iconVwin.width+10 ){
+ 	  x = -screen->iconVwin.width+10;
+ 	};
+ 	if ( x > DisplayWidth()-10 ) {
+ 	  x = DisplayWidth()-10;
+ 	}
+ 	if ( y <= -screen->iconVwin.height+10 ) y = -screen->iconVwin.height+10;
+ 	if ( y > DisplayHeight()-10 ) y = DisplayHeight()-10;
+ 	XMoveWindow (screen->iconVwin.window, x,y);
+ /* End bug fix. */
  	/* allocate memory for screen buffer (including one for status line */
  	screen->buf = screen->allbuf = (ScrnBuf) Allocate (screen->max_row + 2,
  					  screen->max_col +1);

--
Tim Freeman

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

Arpanet: tsf@theory.cs.cmu.edu
Uucp:    ...!seismo!theory.cs.cmu.edu!tsf
Technical Details
Message-ID: <1040@theory.cs.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!theory.cs.cmu.edu!tsf

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!theory.cs.cmu.edu!tsf
From: tsf@theory.cs.cmu.edu (Timothy Freeman)
Newsgroups: comp.windows.x
Subject: Xterm 6.6B bug fix
Message-ID: <1040@theory.cs.cmu.edu>
Date: Sat, 2-May-87 15:32:48 EDT
Article-I.D.: theory.1040
Posted: Sat May  2 15:32:48 1987
Date-Received: Tue, 5-May-87 01:45:16 EDT
Organization: Carnegie-Mellon University, CS/RI
Lines: 54