8178996: [macos] JComboBox doesn't display popup in mixed JavaFX Swing Application on 8u131 and Mac OS 10.12

Reviewed-by: serb, ssadetsky
This commit is contained in:
Alexander Zvegintsev 2017-05-12 15:01:22 +03:00
parent 1351bca5b4
commit 8ec46c5612

View File

@ -274,13 +274,18 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
}
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));