Print this page
*** NO COMMENTS ***

Split Close
Expand all
Collapse all
          --- old/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
          +++ new/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
↓ open down ↓ 480 lines elided ↑ open up ↑
 481  481  
 482  482      private void maximize() {
 483  483          if (peer == null || isMaximized()) {
 484  484              return;
 485  485          }
 486  486          if (!undecorated) {
 487  487              CWrapper.NSWindow.zoom(getNSWindowPtr());
 488  488          } else {
 489  489              deliverZoom(true);
 490  490  
      491 +            // Bugfix for 8066436
      492 +            // setSize has an aynchronous native call to osx which in turn calls
      493 +            // deliverMoveResizeEvent which set the size of the peer
      494 +            // if that call is still in process and the peer is size is not set,
      495 +            // we may get bounds which are previous to setSize
      496 +            // To avoid this we flush all the native events before getting bounds
      497 +            LWCToolkit.flushNativeSelectors();
 491  498              this.normalBounds = peer.getBounds();
 492  499  
 493  500              GraphicsConfiguration config = getPeer().getGraphicsConfiguration();
 494  501              Insets i = ((CGraphicsDevice)config.getDevice()).getScreenInsets();
 495  502              Rectangle toBounds = config.getBounds();
 496  503              setBounds(toBounds.x + i.left,
 497  504                        toBounds.y + i.top,
 498  505                        toBounds.width - i.left - i.right,
 499  506                        toBounds.height - i.top - i.bottom);
 500  507          }
↓ open down ↓ 601 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX