diff --git a/src/macosx/classes/sun/lwawt/LWWindowPeer.java b/src/macosx/classes/sun/lwawt/LWWindowPeer.java index 260e7639551fc7fcfd79d6befbbab11dbdaf47c1..105899034fcdc03afd6a45bf07f4ea36db686a62 100644 --- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java +++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java @@ -1150,8 +1150,11 @@ public class LWWindowPeer 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();