reinstate recently removed disabling of modal window's parent. bug 19221. r:hyatt
git-svn-id: svn://10.0.0.236/trunk@60807 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1107,25 +1107,30 @@ nsWebShellWindow::ConvertWebShellToDOMWindow(nsIWebShell* aShell, nsIDOMWindow**
|
||||
NS_IMETHODIMP
|
||||
nsWebShellWindow::Show(PRBool aShow)
|
||||
{
|
||||
return nsXULWindow::SetVisibility(aShow);
|
||||
return nsXULWindow::SetVisibility(aShow);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShellWindow::ShowModal()
|
||||
{
|
||||
nsresult rv;
|
||||
rv = ShowModalInternal();
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIWebShellWindow> parentWindow;
|
||||
nsCOMPtr<nsIWidget> parentWidget;
|
||||
|
||||
parentWindow = do_QueryReferent(mParentWindow);
|
||||
if (parentWindow)
|
||||
parentWindow->GetWidget(*getter_AddRefs(parentWidget));
|
||||
if (parentWidget)
|
||||
parentWidget->Enable(PR_FALSE);
|
||||
rv = nsXULWindow::ShowModal();
|
||||
if (parentWidget) {
|
||||
parentWidget->Enable(PR_TRUE);
|
||||
parentWindow->Show(PR_TRUE); // bring to front
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShellWindow::ShowModalInternal()
|
||||
{
|
||||
return nsXULWindow::ShowModal();
|
||||
}
|
||||
|
||||
|
||||
// yes, this one's name and ShowModal are a confusing pair. plan is to merge
|
||||
// the two someday.
|
||||
NS_IMETHODIMP
|
||||
@@ -1209,7 +1214,7 @@ nsWebShellWindow::HandleModalDialogEvent(PLEvent *aEvent)
|
||||
{
|
||||
ThreadedWindowEvent *event = (ThreadedWindowEvent *) aEvent;
|
||||
|
||||
event->window->ShowModalInternal();
|
||||
event->window->ShowModal();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user