# HG changeset patch # User ant # Date 1371213498 -14400 # Node ID c5dbbfc6b24a62b22939c44fbb0ee39cc75178ff # Parent d6c807285ce02060897a4178f5b0a8d76bb8114e 8014821: Regression: Focus issues with Oracle WebCenter Capture applet Reviewed-by: leonidr diff -r d6c807285ce0 -r c5dbbfc6b24a jdk/src/windows/native/sun/windows/awt_Frame.cpp --- a/jdk/src/windows/native/sun/windows/awt_Frame.cpp Thu Jun 13 18:46:17 2013 +0400 +++ b/jdk/src/windows/native/sun/windows/awt_Frame.cpp Fri Jun 14 16:38:18 2013 +0400 @@ -380,9 +380,11 @@ 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());