зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
86e513ba69
Коммит
bb7596b0b2
|
@ -885,9 +885,11 @@ nsCocoaWindow::Show(bool bState)
|
||||||
// appear above the parent and move when the parent does. Setting this
|
// appear above the parent and move when the parent does. Setting this
|
||||||
// needs to happen after the _setWindowNumber calls above, otherwise the
|
// needs to happen after the _setWindowNumber calls above, otherwise the
|
||||||
// window doesn't focus properly.
|
// window doesn't focus properly.
|
||||||
if (nativeParentWindow && mPopupLevel == ePopupLevelParent)
|
if (nativeParentWindow && mPopupLevel == ePopupLevelParent) {
|
||||||
[nativeParentWindow addChildWindow:mWindow
|
[nativeParentWindow addChildWindow:mWindow
|
||||||
ordered:NSWindowAbove];
|
ordered:NSWindowAbove];
|
||||||
|
[mWindow setLevel:NSPopUpMenuWindowLevel];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||||
|
@ -1375,6 +1377,7 @@ nsCocoaWindow::HideWindowChrome(bool aShouldHide)
|
||||||
enumerator = [childWindows objectEnumerator];
|
enumerator = [childWindows objectEnumerator];
|
||||||
while ((child = [enumerator nextObject])) {
|
while ((child = [enumerator nextObject])) {
|
||||||
[mWindow addChildWindow:child ordered:NSWindowAbove];
|
[mWindow addChildWindow:child ordered:NSWindowAbove];
|
||||||
|
[mWindow setLevel:NSPopUpMenuWindowLevel];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the new window.
|
// Show the new window.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче