提交 cb914a68 编写于 作者: A anashaty

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

Reviewed-by: ant, serb
上级 64c71f34
...@@ -1295,6 +1295,12 @@ public class LWWindowPeer ...@@ -1295,6 +1295,12 @@ public class LWWindowPeer
} }
KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance(); KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
if (!becomesFocused && kfmPeer.getCurrentFocusedWindow() != getTarget()) {
// late window focus lost event - ingoring
return;
}
kfmPeer.setCurrentFocusedWindow(becomesFocused ? getTarget() : null); kfmPeer.setCurrentFocusedWindow(becomesFocused ? getTarget() : null);
int eventID = becomesFocused ? WindowEvent.WINDOW_GAINED_FOCUS : WindowEvent.WINDOW_LOST_FOCUS; int eventID = becomesFocused ? WindowEvent.WINDOW_GAINED_FOCUS : WindowEvent.WINDOW_LOST_FOCUS;
......
...@@ -161,7 +161,7 @@ public class CEmbeddedFrame extends EmbeddedFrame { ...@@ -161,7 +161,7 @@ public class CEmbeddedFrame extends EmbeddedFrame {
} }
// ignore focus "lost" native request as it may mistakenly // ignore focus "lost" native request as it may mistakenly
// deactivate active window (see 8001161) // deactivate active window (see 8001161)
if (globalFocusedWindow == this && parentWindowActive) { if (globalFocusedWindow == this) {
responder.handleWindowFocusEvent(parentWindowActive, null); responder.handleWindowFocusEvent(parentWindowActive, null);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册