зеркало из https://github.com/mozilla/pjs.git
don't focus the parent of the window being closed if that parent is the hidden window. this reinstates rev 1.52, bug 22658. now bug 224058. r=ere, roc
This commit is contained in:
Родитель
e73bfeb681
Коммит
cf419872ca
|
@ -466,10 +466,21 @@ NS_IMETHODIMP nsXULWindow::Destroy()
|
|||
// We need to explicitly set the focus on Windows
|
||||
nsCOMPtr<nsIBaseWindow> parent(do_QueryReferent(mParentWindow));
|
||||
if (parent) {
|
||||
nsCOMPtr<nsIWidget> parentWidget;
|
||||
parent->GetMainWidget(getter_AddRefs(parentWidget));
|
||||
if (parentWidget)
|
||||
parentWidget->PlaceBehind(eZPlacementTop, 0, PR_TRUE);
|
||||
nsCOMPtr<nsIBaseWindow> baseHiddenWindow;
|
||||
if (appShell) {
|
||||
nsCOMPtr<nsIXULWindow> hiddenWindow;
|
||||
appShell->GetHiddenWindow(getter_AddRefs(hiddenWindow));
|
||||
if (hiddenWindow)
|
||||
baseHiddenWindow = do_GetInterface(hiddenWindow);
|
||||
}
|
||||
// somebody screwed up somewhere. hiddenwindow shouldn't be anybody's
|
||||
// parent. still, when it happens, skip activating it.
|
||||
if (baseHiddenWindow != parent) {
|
||||
nsCOMPtr<nsIWidget> parentWidget;
|
||||
parent->GetMainWidget(getter_AddRefs(parentWidget));
|
||||
if (parentWidget)
|
||||
parentWidget->PlaceBehind(eZPlacementTop, 0, PR_TRUE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче