diff --git a/mozilla/widget/src/windows/nsWindow.cpp b/mozilla/widget/src/windows/nsWindow.cpp index 6e6916ca030..bd49a498ade 100644 --- a/mozilla/widget/src/windows/nsWindow.cpp +++ b/mozilla/widget/src/windows/nsWindow.cpp @@ -702,10 +702,16 @@ NS_METHOD nsWindow::Show(PRBool bState) if (mWnd) { if (bState) { DWORD flags = SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW; + if ((mIsVisible) || (mWindowType == eWindowType_popup)) { + flags |= SWP_NOZORDER; + } + if (mWindowType == eWindowType_popup) { flags |= SWP_NOACTIVATE; - } + ::SetWindowPos(mWnd, HWND_TOPMOST, 0, 0, 0, 0, flags); + } else { ::SetWindowPos(mWnd, HWND_TOP, 0, 0, 0, 0, flags); + } } else ::ShowWindow(mWnd, SW_HIDE);