reinstate recently removed disabling of modal window's parent. bug 19221. r:hyatt

This commit is contained in:
danm%netscape.com 2000-02-15 05:06:08 +00:00
parent d1428bcbdb
commit 10574123ae
2 changed files with 16 additions and 12 deletions

View File

@ -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;
}

View File

@ -247,7 +247,6 @@ protected:
virtual ~nsWebShellWindow();
static nsEventStatus PR_CALLBACK HandleEvent(nsGUIEvent *aEvent);
NS_IMETHODIMP ShowModalInternal();
nsresult NotifyObservers( const nsString &aTopic, const nsString &someData );