mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1211647. Use ::ShowWindow instead of ::ShowWindowPos for toplevel windows widgets that can't take focus. r=jimm
This commit is contained in:
parent
0f69ca549f
commit
5f4030b30a
@ -1257,15 +1257,7 @@ NS_METHOD nsWindow::Show(bool bState)
|
||||
if (CanTakeFocus()) {
|
||||
::ShowWindow(mWnd, SW_SHOWNORMAL);
|
||||
} else {
|
||||
// Place the window behind the foreground window
|
||||
// (as long as it is not topmost)
|
||||
HWND wndAfter = ::GetForegroundWindow();
|
||||
if (!wndAfter)
|
||||
wndAfter = HWND_BOTTOM;
|
||||
else if (GetWindowLongPtrW(wndAfter, GWL_EXSTYLE) & WS_EX_TOPMOST)
|
||||
wndAfter = HWND_TOP;
|
||||
::SetWindowPos(mWnd, wndAfter, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE |
|
||||
SWP_NOMOVE | SWP_NOACTIVATE);
|
||||
::ShowWindow(mWnd, SW_SHOWNOACTIVATE);
|
||||
GetAttention(2);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user