rem: var currentWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() ); if ( currentWindow.screenX == screenX && currentWindow.screenY == screenY ) 
add: var thisWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() ); if ( (thisWindow.screenX == screenX) && (thisWindow.screenY == screenY) ) 
context: function TileWindow(){	var xShift = 25;	var yShift = 50;	var done = false;	var windowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService();	dump("got window Manager \n");	var	windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);		var enumerator = windowManagerInterface.getEnumerator( null );		var xOffset = screen.availLeft;	var yOffset = screen.availRight;	do	{		var currentWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );		if ( currentWindow.screenX == screenX && currentWindow.screenY == screenY )		{			alreadyThere = true;			break;		}		} while ( enumerator.hasMoreElements() )		if ( alreadyThere )	{		enumerator = windowManagerInterface.getEnumerator( null );		do		{			var currentWindow = windowManagerInterface.convertISupportsToDOMWindow ( enumerator.getNext() );			if ( currentWindow.screenX == screenX+xOffset*xShift+yOffset*xShift   && currentWindow.screenY == screenY+yShift*xOffset && window != currentWindow )			{				xOffset++;				if ( (screenY+outerHeight  < screen.availHeight) && (screenY+outerHeight+yShift*xOffset > screen.availHeight ) )				{					dump(" increment yOffset");					yOffset++;					xOffset = 0;				}				enumerator = windowManagerInterface.getEnumerator( null );			}			} while ( enumerator.hasMoreElements() )	}		if ( xOffset > 0 || yOffset >0 )	{		dump( "offsets:"+xOffset+" "+yOffset+"\n");		dump("Move by ("+ xOffset*xShift + yOffset*xShift +","+ yShift*xOffset +")\n");		moveBy( xOffset*xShift + yOffset*xShift, yShift*xOffset );	}}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a3fd1360f8a3ed6857cc435f9c9b5e8b3cdd9ef2/navigator.js/clean/xpfe/browser/resources/content/navigator.js