# HG changeset patch # User azvegint # Date 1500902050 -3600 # Node ID fa22e8668c4d96c0371c93cbc0ecdf4db86efd55 # Parent a2a33977067891275621570c7c14de59b380e7a7 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 a2a339770678 -r fa22e8668c4d src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java --- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Tue May 23 11:30:25 2017 -0700 +++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Mon Jul 24 14:14:10 2017 +0100 @@ -272,16 +272,21 @@ contentView.execute(new CFNativeAction() { @Override public void run(final long viewPtr) { + boolean hasOwnerPtr = false; + if (owner != null) { - owner.execute(new CFNativeAction() { + hasOwnerPtr = 0L != owner.executeGet(new CFNativeActionGet() { @Override - public void run(long ownerPtr) { + public long run(long 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));