提交 ce232e82 编写于 作者: A ant

6567410: PIT : java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java fails

Summary: A filter flag has been added to the HCBT focus hook.
Reviewed-by: dcherepanov
上级 2b4bf248
......@@ -334,8 +334,11 @@ LRESULT CALLBACK AwtWindow::CBTFilter(int nCode, WPARAM wParam, LPARAM lParam)
if (nCode == HCBT_ACTIVATE || nCode == HCBT_SETFOCUS) {
AwtComponent *comp = AwtComponent::GetComponent((HWND)wParam);
if (comp != NULL && comp->IsTopLevel() && !((AwtWindow*)comp)->IsFocusableWindow()) {
return 1; // Don't change focus/activation.
if (comp != NULL && comp->IsTopLevel()) {
AwtWindow* win = (AwtWindow*)comp;
if (!win->IsFocusableWindow() || win->m_filterFocusAndActivation) {
return 1; // Don't change focus/activation.
}
}
}
return ::CallNextHookEx(AwtWindow::ms_hCBTFilter, nCode, wParam, lParam);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册