tsf@theory.cs.cmu.edu (Timothy Freeman) (05/02/87)
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