8014821: Regression: Focus issues with Oracle WebCenter Capture applet
authorant
Fri, 14 Jun 2013 16:38:18 +0400
changeset 18131 c5dbbfc6b24a
parent 18130 d6c807285ce0
child 18132 83b6a2cc05a3
8014821: Regression: Focus issues with Oracle WebCenter Capture applet Reviewed-by: leonidr
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());