--- old/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Mon Mar 2 10:40:35 2015 +++ new/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Mon Mar 2 10:40:33 2015 @@ -488,6 +488,13 @@ } else { deliverZoom(true); + // Bugfix for 8066436 + // setSize has an aynchronous native call to osx which in turn calls + // deliverMoveResizeEvent which set the size of the peer + // if that call is still in process and the peer is size is not set, + // we may get bounds which are previous to setSize + // To avoid this we flush all the native events before getting bounds + LWCToolkit.flushNativeSelectors(); this.normalBounds = peer.getBounds(); GraphicsConfiguration config = getPeer().getGraphicsConfiguration(); --- old/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Mon Mar 2 10:40:35 2015 +++ new/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Mon Mar 2 10:40:33 2015 @@ -843,7 +843,7 @@ /** * Just spin a single empty block synchronously. */ - private static native void flushNativeSelectors(); + static native void flushNativeSelectors(); @Override public Clipboard createPlatformClipboard() {