# HG changeset patch # User pchelko # Date 1380718693 -14400 # Node ID 0eef03207781dece694851e2eb9e6d5af4197544 # Parent d1505296ba5c0e1febbe16984ea69268705ab6f4 8024158: [macosx] java/awt/EventDispatchThread/LoopRobustness/LoopRobustness still failed after fix JDK-8022247; since jdk8b96 Reviewed-by: art, leonidr diff -r d1505296ba5c -r 0eef03207781 jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java --- a/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java Wed Oct 02 11:50:58 2013 +0400 +++ b/jdk/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();