mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-21 04:10:33 +00:00
8074481: [macosx] Menu items are appearing on top of other windows
Reviewed-by: ant, serb
This commit is contained in:
parent
a6872dbbfb
commit
795c4bd736
@ -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;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user