提交 cd3bc324 编写于 作者: A ant

8140525: AwtFrame::WmShowWindow() may steal focus

Reviewed-by: serb, ssadetsky
上级 30fa389f
...@@ -484,7 +484,10 @@ MsgRouting AwtFrame::WmShowWindow(BOOL show, UINT status) ...@@ -484,7 +484,10 @@ MsgRouting AwtFrame::WmShowWindow(BOOL show, UINT status)
if (fgProcessID != ::GetCurrentProcessId()) { if (fgProcessID != ::GetCurrentProcessId()) {
AwtWindow* window = (AwtWindow*)GetComponent(GetHWnd()); AwtWindow* window = (AwtWindow*)GetComponent(GetHWnd());
if (window != NULL && window->IsFocusableWindow() && window->IsAutoRequestFocus() && if (window != NULL &&
window->IsFocusableWindow() &&
window->IsAutoRequestFocus() &&
!::IsWindowVisible(GetHWnd()) && // the window is really showing
!::IsWindow(GetModalBlocker(GetHWnd()))) !::IsWindow(GetModalBlocker(GetHWnd())))
{ {
// When the Java process is not allowed to set the foreground window // When the Java process is not allowed to set the foreground window
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册