nsWindow.cpp (basilisk-2021.12.14-source.tar.xz) | : | nsWindow.cpp (basilisk-2022.01.27-source.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 1581 | skipping to change at line 1581 | |||
if (wasVisible) | if (wasVisible) | |||
flags |= SWP_NOZORDER; | flags |= SWP_NOZORDER; | |||
if (mWindowType == eWindowType_popup) { | if (mWindowType == eWindowType_popup) { | |||
// ensure popups are the topmost of the TOPMOST | // ensure popups are the topmost of the TOPMOST | |||
// layer. Remember not to set the SWP_NOZORDER | // layer. Remember not to set the SWP_NOZORDER | |||
// flag as that might allow the taskbar to overlap | // flag as that might allow the taskbar to overlap | |||
// the popup. | // the popup. | |||
flags |= SWP_NOACTIVATE; | flags |= SWP_NOACTIVATE; | |||
HWND owner = ::GetWindow(mWnd, GW_OWNER); | 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 { | } else { | |||
if (mWindowType == eWindowType_dialog && !CanTakeFocus()) | if (mWindowType == eWindowType_dialog && !CanTakeFocus()) | |||
flags |= SWP_NOACTIVATE; | flags |= SWP_NOACTIVATE; | |||
::SetWindowPos(mWnd, HWND_TOP, 0, 0, 0, 0, flags); | ::SetWindowPos(mWnd, HWND_TOP, 0, 0, 0, 0, flags); | |||
} | } | |||
} | } | |||
if (!wasVisible && (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog)) { | if (!wasVisible && (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog)) { | |||
// when a toplevel window or dialog is shown, initialize the UI state | // when a toplevel window or dialog is shown, initialize the UI state | |||
skipping to change at line 3436 | skipping to change at line 3449 | |||
if (mSizeMode == nsSizeMode_Fullscreen) | if (mSizeMode == nsSizeMode_Fullscreen) | |||
return NS_OK; | return NS_OK; | |||
mOldSizeMode = mSizeMode; | mOldSizeMode = mSizeMode; | |||
SetSizeMode(nsSizeMode_Fullscreen); | SetSizeMode(nsSizeMode_Fullscreen); | |||
// Notify the taskbar that we will be entering full screen mode. | // Notify the taskbar that we will be entering full screen mode. | |||
if (taskbarInfo) { | if (taskbarInfo) { | |||
taskbarInfo->PrepareFullScreenHWND(mWnd, TRUE); | taskbarInfo->PrepareFullScreenHWND(mWnd, TRUE); | |||
} | } | |||
} else { | } else { | |||
if (mSizeMode != nsSizeMode_Fullscreen) | ||||
return NS_OK; | ||||
SetSizeMode(mOldSizeMode); | SetSizeMode(mOldSizeMode); | |||
} | } | |||
// If we are going fullscreen, the window size continues to change | // If we are going fullscreen, the window size continues to change | |||
// and the window will be reflow again then. | // and the window will be reflow again then. | |||
UpdateNonClientMargins(mSizeMode, /* Reflow */ !aFullScreen); | UpdateNonClientMargins(mSizeMode, /* Reflow */ !aFullScreen); | |||
// Will call hide chrome, reposition window. Note this will | // Will call hide chrome, reposition window. Note this will | |||
// also cache dimensions for restoration, so it should only | // also cache dimensions for restoration, so it should only | |||
// be called once per fullscreen request. | // be called once per fullscreen request. | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 14 lines changed or added |