mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Bug 1740389; r=handyman, a=tjr
Bug 1735071: Make Windows non-ePopupLevelTop popups respect owner z-order. r=edgar, a=tjr
This commit is contained in:
parent
138137ddea
commit
7d96ee2fe6
1 changed files with 14 additions and 3 deletions
|
|
@ -1587,7 +1587,20 @@ NS_IMETHODIMP nsWindow::Show(bool bState)
|
|||
// the popup.
|
||||
flags |= SWP_NOACTIVATE;
|
||||
HWND owner = ::GetWindow(mWnd, GW_OWNER);
|
||||
::SetWindowPos(mWnd, owner ? 0 : HWND_TOPMOST, 0, 0, 0, 0, flags);
|
||||
if (owner) {
|
||||
// ePopupLevelTop popups should be above all else. All other
|
||||
// types should be placed in front of their owner, without
|
||||
// changing the owner's z-level relative to other windows.
|
||||
if (PopupLevel() != ePopupLevelTop) {
|
||||
::SetWindowPos(mWnd, owner, 0, 0, 0, 0, flags);
|
||||
::SetWindowPos(owner, mWnd, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||
} else {
|
||||
::SetWindowPos(mWnd, HWND_TOP, 0, 0, 0, 0, flags);
|
||||
}
|
||||
} else {
|
||||
::SetWindowPos(mWnd, HWND_TOPMOST, 0, 0, 0, 0, flags);
|
||||
}
|
||||
} else {
|
||||
if (mWindowType == eWindowType_dialog && !CanTakeFocus())
|
||||
flags |= SWP_NOACTIVATE;
|
||||
|
|
@ -3449,8 +3462,6 @@ nsWindow::MakeFullScreen(bool aFullScreen, nsIScreen* aTargetScreen)
|
|||
taskbarInfo->PrepareFullScreenHWND(mWnd, TRUE);
|
||||
}
|
||||
} else {
|
||||
if (mSizeMode != nsSizeMode_Fullscreen)
|
||||
return NS_OK;
|
||||
SetSizeMode(mOldSizeMode);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue