8178996: [macos] JComboBox doesn't display popup in mixed JavaFX Swing Application on 8u131 and Mac OS 10.12
Reviewed-by: serb, ssadetsky
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Fri May 12 12:28:49 2017 +0530
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Fri May 12 15:01:22 2017 +0300
@@ -274,13 +274,18 @@
}
AtomicLong ref = new AtomicLong();
contentView.execute(viewPtr -> {
+ boolean hasOwnerPtr = false;
+
if (owner != null) {
- owner.execute(ownerPtr -> {
+ hasOwnerPtr = 0L != owner.executeGet(ownerPtr -> {
ref.set(nativeCreateNSWindow(viewPtr, ownerPtr, styleBits,
- bounds.x, bounds.y,
- bounds.width, bounds.height));
+ bounds.x, bounds.y,
+ bounds.width, bounds.height));
+ return 1;
});
- } else {
+ }
+
+ if (!hasOwnerPtr) {
ref.set(nativeCreateNSWindow(viewPtr, 0,
styleBits, bounds.x, bounds.y,
bounds.width, bounds.height));