Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!watmath.waterloo.edu!jmsellens From: jmsellens@watmath.waterloo.edu.UUCP Newsgroups: comp.windows.x Subject: xterm - icons can disappear off screen ... Message-ID: <8702260321.AA14596@ATHENA> Date: Wed, 25-Feb-87 18:36:32 EST Article-I.D.: ATHENA.8702260321.AA14596 Posted: Wed Feb 25 18:36:32 1987 Date-Received: Sat, 28-Feb-87 00:09:50 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 46 If you have a non-active icon at the left side of your screen, and you change the title of the window to a shorter one, the icon may disappear off the screen since the upper left corner stays in the same place, and the icon shrinks. This is what I did to misc.c around line 866: #ifdef waterloo if (screen->iconVwin.window) { WindowInfo info; int x, y; XChangeWindow( screen->iconVwin.window, screen->iconVwin.width, screen->iconVwin.height ); /* make sure that the icon hasn't shifted completely off sceen */ if ( XQueryWindow( screen->iconVwin.window, &info ) ) if ( info.x + info.width < 10 || info.y + info.height < 10 ) { x = info.x+info.width<10 ? 10 - info.width : info.x; y = info.y+info.height<10 ? 10 - info.height : info.y; XMoveWindow( screen->iconVwin.window, x, y ); } } #else if (screen->iconVwin.window) XChangeWindow( screen->iconVwin.window, screen->iconVwin.width, screen->iconVwin.height ); #endif if (screen->iconTwin.window) { #ifdef waterloo WindowInfo info; int x, y; screen->iconTwin.width = screen->iconVwin.width; screen->iconTwin.height = screen->iconVwin.height; XChangeWindow( screen->iconTwin.window, screen->iconTwin.width, screen->iconTwin.height ); /* make sure that the icon hasn't shifted completely off sceen */ if ( XQueryWindow( screen->iconTwin.window, &info ) ) if ( info.x + info.width < 10 || info.y + info.height < 10 ) { x = info.x+info.width<10 ? 10 - info.width : info.x; y = info.y+info.height<10 ? 10 - info.height : info.y; XMoveWindow( screen->iconTwin.window, x, y ); } #else screen->iconTwin.width = screen->iconVwin.width; screen->iconTwin.height = screen->iconVwin.height; XChangeWindow( screen->iconTwin.window, screen->iconTwin.width, screen->iconTwin.height ); #endif