mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Fix for bug 259816: Browser steals focus from program selected in 'Open With' dialog
r=neil sr=roc
This commit is contained in:
parent
cb56ef4ec2
commit
cd54a2cfe7
@ -1710,8 +1710,13 @@ NS_METHOD nsWindow::Show(PRBool bState)
|
||||
break;
|
||||
default :
|
||||
mode = SW_SHOWNORMAL;
|
||||
// Don't take focus if the active window is not one of ours (e.g. bug 259816)
|
||||
if (!GetNSWindowPtr(::GetForegroundWindow()))
|
||||
mode = SW_SHOWNOACTIVATE;
|
||||
}
|
||||
::ShowWindow(mWnd, mode);
|
||||
if (mode == SW_SHOWNOACTIVATE)
|
||||
GetAttention(2);
|
||||
} else {
|
||||
DWORD flags = SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW;
|
||||
if (mIsVisible)
|
||||
|
Loading…
x
Reference in New Issue
Block a user