# HG changeset patch # User azvegint # Date 1494590482 -10800 # Node ID f5223be944fa861e2bb9b94ede0ca22f9b4ba940 # Parent 60b7b5f395803457ff22ce87453a30601e3982fe 8178996: [macos] JComboBox doesn't display popup in mixed JavaFX Swing Application on 8u131 and Mac OS 10.12 Reviewed-by: serb, ssadetsky diff -r 60b7b5f39580 -r f5223be944fa jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java --- 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));