mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Fixes to opening navigator window from tasks menu and taskbar (hangas and davidm).
This commit is contained in:
parent
7188783d86
commit
38c8fca1da
@ -40,7 +40,7 @@ function toOpenWindowByType( inType, uri )
|
|||||||
if ( topWindow )
|
if ( topWindow )
|
||||||
topWindow.focus();
|
topWindow.focus();
|
||||||
else
|
else
|
||||||
window.open(uri, "_New", "chrome,menubar");
|
window.open(uri, "", "chrome,menubar");
|
||||||
}
|
}
|
||||||
|
|
||||||
function CycleWindow( inType, inChromeURL )
|
function CycleWindow( inType, inChromeURL )
|
||||||
@ -52,9 +52,18 @@ function CycleWindow( inType, inChromeURL )
|
|||||||
|
|
||||||
var desiredWindow = null;
|
var desiredWindow = null;
|
||||||
|
|
||||||
topWindowOfType = windowManagerInterface.GetMostRecentWindow( inType );
|
var topWindowOfType = windowManagerInterface.GetMostRecentWindow( inType );
|
||||||
topWindow = windowManagerInterface.GetMostRecentWindow( null );
|
var topWindow = windowManagerInterface.GetMostRecentWindow( null );
|
||||||
dump( "got windows \n");
|
dump( "got windows \n");
|
||||||
|
|
||||||
|
dump( "topWindowOfType = " + topWindowOfType + "\n");
|
||||||
|
if ( topWindowOfType == null )
|
||||||
|
{
|
||||||
|
dump( " no windows of this type so create a new one \n");
|
||||||
|
window.open( inChromeURL, "","chrome,menubar,toolbar" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( topWindowOfType != topWindow )
|
if ( topWindowOfType != topWindow )
|
||||||
{
|
{
|
||||||
dump( "first not top so give focus \n");
|
dump( "first not top so give focus \n");
|
||||||
@ -62,11 +71,6 @@ function CycleWindow( inType, inChromeURL )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( topWindowOfType == null )
|
|
||||||
{
|
|
||||||
dump( " no windows of this type so create a new one \n");
|
|
||||||
window.open( inChromeURL, "","chrome,menubar" );
|
|
||||||
}
|
|
||||||
var enumerator = windowManagerInterface.GetEnumerator( inType );
|
var enumerator = windowManagerInterface.GetEnumerator( inType );
|
||||||
firstWindow = windowManagerInterface.ConvertISupportsToDOMWindow ( enumerator.GetNext() );
|
firstWindow = windowManagerInterface.ConvertISupportsToDOMWindow ( enumerator.GetNext() );
|
||||||
if ( firstWindow == topWindowOfType )
|
if ( firstWindow == topWindowOfType )
|
||||||
|
Loading…
Reference in New Issue
Block a user