mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
reinstate recently removed disabling of modal window's parent. bug 19221. r:hyatt
This commit is contained in:
parent
d1428bcbdb
commit
10574123ae
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user