<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    Please review the fix for JDK 9.<br>
    <br>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    CPlatformWindow set bounds using setBounds() which calls native
    function nativeNSSetWindowBounds() -> calls the OSX function.
    After that ox callbacks to java using deliverMoveresizeEvent() where
    the peer or window associated with native window is notified of
    change of bounds. <br>
    <br>
    In maximize() we need peer’s bound which are saved as normalBounds
    to use them to unmaximize. <br>
    <br>
    The problem <br>
    1. Customer creates window where the size width height is (1, 1) <br>
    2. setSize call is made (600,900) which starts the setBounds process
    described earlier <br>
    3. setExtendedState(MAXIMIZED) is called which calls maximize(). But
    the callback for deliverMoveresizeEvent() has not yet processed and
    the the bounds we get are earlier (1,1). <br>
    4. Window is maximized. <br>
    5. Now when we try to unmaximize or iconify the window the size is
    set to (1,1) and we can’t see the window. <br>
    <br>
    Even if we are using the bounds which are available (as the event
    processing is asynchronous) this can cause lot of problems as the
    window just disappears. Adding LWCToolkit.flushNativeSelectors();
    just before saving the bounds can get us the correct bounds which we
    are expecting. <br>
    <br>
    Bug : <a moz-do-not-send="true" class="moz-txt-link-freetext"
      href="https://bugs.openjdk.java.net/browse/JDK-8066436">https://bugs.openjdk.java.net/browse/JDK-8066436</a><br>
    Webrev: <a moz-do-not-send="true" class="moz-txt-link-freetext"
      href="http://cr.openjdk.java.net/%7Evan/8066436/webrev.00/">http://cr.openjdk.java.net/~van/8066436/webrev.00/</a><br>
    <br>
    Regards,<br>
    Nakul<br>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <br>
  </body>
</html>