get window.focus() working again. b=419338 r=hwaara sr=roc

This commit is contained in:
joshmoz@gmail.com 2008-02-26 11:32:19 -08:00
parent 0f1f2d3257
commit 024b65210e

View File

@ -526,7 +526,9 @@ NS_IMETHODIMP nsCocoaWindow::Show(PRBool bState)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
if (!mSheetNeedsShow && bState == [mWindow isVisible])
// We need to re-execute sometimes in order to bring already-visible
// windows forward.
if (!mSheetNeedsShow && !bState && ![mWindow isVisible])
return NS_OK;
nsIWidget* parentWidget = mParent;