Bug 1406032: Ensure that popup windows (such as the hamburger menu window) are shown on top of the browser window on macOS. r=mstange

This commit is contained in:
Stephen A Pohl 2017-10-19 23:42:23 -04:00
Родитель 86e513ba69
Коммит bb7596b0b2
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -885,9 +885,11 @@ nsCocoaWindow::Show(bool bState)
// appear above the parent and move when the parent does. Setting this
// needs to happen after the _setWindowNumber calls above, otherwise the
// window doesn't focus properly.
if (nativeParentWindow && mPopupLevel == ePopupLevelParent)
if (nativeParentWindow && mPopupLevel == ePopupLevelParent) {
[nativeParentWindow addChildWindow:mWindow
ordered:NSWindowAbove];
[mWindow setLevel:NSPopUpMenuWindowLevel];
}
}
else {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
@ -1375,6 +1377,7 @@ nsCocoaWindow::HideWindowChrome(bool aShouldHide)
enumerator = [childWindows objectEnumerator];
while ((child = [enumerator nextObject])) {
[mWindow addChildWindow:child ordered:NSWindowAbove];
[mWindow setLevel:NSPopUpMenuWindowLevel];
}
// Show the new window.