changeset 8231:287e0a7731ff

8024158: [macosx] java/awt/EventDispatchThread/LoopRobustness/LoopRobustness still failed after fix JDK-8022247; since jdk8b96 Reviewed-by: art, leonidr
author pchelko
date Wed, 02 Oct 2013 16:58:13 +0400
parents 01198c681710
children 244f2ee51f31
files src/macosx/classes/sun/lwawt/LWWindowPeer.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Oct 02 11:50:58 2013 +0400
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Oct 02 16:58:13 2013 +0400
@@ -1150,8 +1150,11 @@
             return false;
         }
 
-        Window currentActive = KeyboardFocusManager.
-            getCurrentKeyboardFocusManager().getActiveWindow();
+        AppContext targetAppContext = AWTAccessor.getComponentAccessor().getAppContext(getTarget());
+        KeyboardFocusManager kfm = AWTAccessor.getKeyboardFocusManagerAccessor()
+                .getCurrentKeyboardFocusManager(targetAppContext);
+        Window currentActive = kfm.getActiveWindow();
+
 
         Window opposite = LWKeyboardFocusManagerPeer.getInstance().
             getCurrentFocusedWindow();