8014821: Regression: Focus issues with Oracle WebCenter Capture applet
Reviewed-by: leonidr
--- 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());