8014821: Regression: Focus issues with Oracle WebCenter Capture applet

Reviewed-by: leonidr
This commit is contained in:
Anton Tarasov 2013-06-14 16:38:18 +04:00
parent 21b8cd749b
commit 0e763b1f06

View File

@ -380,9 +380,11 @@ LRESULT AwtFrame::ProxyWindowProc(UINT message, WPARAM wParam, LPARAM lParam, Ms
if (!sm_suppressFocusAndActivation) {
if (IsLightweightFrame() || IsEmbeddedFrame()) {
AwtWindow::SynthesizeWmActivate(FALSE, GetHWnd(), NULL);
HWND oppositeToplevelHWnd = AwtComponent::GetTopLevelParentForWindow((HWND)wParam);
if (oppositeToplevelHWnd != AwtComponent::GetFocusedWindow()) {
AwtWindow::SynthesizeWmActivate(FALSE, GetHWnd(), NULL);
}
}
} else if (sm_restoreFocusAndActivation) {
if (AwtComponent::GetFocusedWindow() != NULL) {
AwtWindow *focusedWindow = (AwtWindow*)GetComponent(AwtComponent::GetFocusedWindow());