changeset 6424:282d82bfdde7

8014821: Regression: Focus issues with Oracle WebCenter Capture applet Reviewed-by: anthony, leonidr Contributed-by: anton.tarasov@oracle.com
author leonidr
date Wed, 26 Jun 2013 05:57:45 +0400
parents ee18d5c46468
children 27808c388ea3
files src/windows/native/sun/windows/awt_Frame.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/sun/windows/awt_Frame.cpp	Tue Jun 25 16:12:47 2013 -0700
+++ b/src/windows/native/sun/windows/awt_Frame.cpp	Wed Jun 26 05:57:45 2013 +0400
@@ -354,8 +354,10 @@
             if (sm_inSynthesizeFocus) break; // pass it up the WindowProc chain
 
             if (!sm_suppressFocusAndActivation && 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());