提交 857dd28a 编写于 作者: A asaha

Merge

......@@ -628,6 +628,8 @@ e915a408ebf7ba05b36d1b714e166a1d9e5c7edd jdk8u102-b11
901ecf04370c7c03c61e22ab87a266c355baff54 jdk8u102-b13
48c99b42383912886c005891c04b5f599adf6722 jdk8u102-b14
222d3ac3aa1f99f16e31c1c4a10f916ce83ff759 jdk8u102-b31
e3839fe291add6e0ea199457fb31c9312cc5dd77 jdk8u102-b32
275fcb7d4e3e70a37ac70c33d087a805ba182f1e jdk8u102-b33
ebc56c2e803597ef409a5296addc986b390d934d jdk8u111-b00
c4f03717831993e4658b8366810ca4682ece952d jdk8u111-b01
de1d09f09e571e38afdf1fb72984ec210e7c19e6 jdk8u111-b02
......
......@@ -800,6 +800,18 @@ AWT_ASSERT_APPKIT_THREAD;
- (void)sendEvent:(NSEvent *)event {
if ([event type] == NSLeftMouseDown || [event type] == NSRightMouseDown || [event type] == NSOtherMouseDown) {
// Move parent windows to front and make sure that a child window is displayed
// in front of its nearest parent.
if (self.ownerWindow != nil) {
JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
if (platformWindow != NULL) {
static JNF_MEMBER_CACHE(jm_orderAboveSiblings, jc_CPlatformWindow, "orderAboveSiblings", "()V");
JNFCallVoidMethod(env,platformWindow, jm_orderAboveSiblings);
(*env)->DeleteLocalRef(env, platformWindow);
}
}
[self orderChildWindows:YES];
NSPoint p = [NSEvent mouseLocation];
NSRect frame = [self.nsWindow frame];
......@@ -1100,6 +1112,16 @@ JNF_COCOA_ENTER(env);
NSWindow *nsWindow = OBJC(windowPtr);
[ThreadUtilities performOnMainThreadWaiting:NO block:^(){
[nsWindow orderBack:nil];
// Order parent windows
AWTWindow *awtWindow = (AWTWindow*)[nsWindow delegate];
while (awtWindow.ownerWindow != nil) {
awtWindow = awtWindow.ownerWindow;
if ([AWTWindow isJavaPlatformWindowVisible:awtWindow.nsWindow]) {
[awtWindow.nsWindow orderBack:nil];
}
}
// Order child windows
[(AWTWindow*)[nsWindow delegate] orderChildWindows:NO];
}];
JNF_COCOA_EXIT(env);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册