8074481: [macosx] Menu items are appearing on top of other windows

Reviewed-by: ant, serb
This commit is contained in:
Anton Nashatyrev 2015-03-30 17:46:58 +03:00
parent a6872dbbfb
commit 795c4bd736
2 changed files with 7 additions and 1 deletions

View File

@ -1296,6 +1296,12 @@ public class LWWindowPeer
}
KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
if (!becomesFocused && kfmPeer.getCurrentFocusedWindow() != getTarget()) {
// late window focus lost event - ingoring
return;
}
kfmPeer.setCurrentFocusedWindow(becomesFocused ? getTarget() : null);
int eventID = becomesFocused ? WindowEvent.WINDOW_GAINED_FOCUS : WindowEvent.WINDOW_LOST_FOCUS;

View File

@ -164,7 +164,7 @@ public class CEmbeddedFrame extends EmbeddedFrame {
}
// ignore focus "lost" native request as it may mistakenly
// deactivate active window (see 8001161)
if (globalFocusedWindow == this && parentWindowActive) {
if (globalFocusedWindow == this) {
responder.handleWindowFocusEvent(parentWindowActive, null);
}
}