<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">11.03.15 18:40, Sergey Bylokhov wrote:<br>
    </div>
    <blockquote cite="mid:5500EE72.8050804@oracle.com" type="cite">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <tt>Hello.<br>
        Please review the fix for jdk 8/9.<br>
        Lots of issues(hangs or focus lost) occurred after we call
        NSScreen.backingScaleFactor on a Appkit Thread in time of splash
        screen initialization.<br>
        This is a regression of two fixes:<br>
        <a moz-do-not-send="true" class="moz-txt-link-freetext"
          href="https://bugs.openjdk.java.net/browse/JDK-8043869">https://bugs.openjdk.java.net/browse/JDK-8043869</a></tt><br>
      <tt><tt><a moz-do-not-send="true" class="moz-txt-link-freetext"
            href="https://bugs.openjdk.java.net/browse/JDK-8049198">https://bugs.openjdk.java.net/browse/JDK-8049198</a><br>
          Current issue occures after the second fix.<br>
          <br>
        </tt>Bug: <a moz-do-not-send="true"
          class="moz-txt-link-freetext"
          href="https://bugs.openjdk.java.net/browse/JDK-8074668">https://bugs.openjdk.java.net/browse/JDK-8074668</a></tt><br>
      <tt>
        <meta http-equiv="content-type" content="text/html;
          charset=utf-8">
        As a fix I suggest to disable functionality which was added in <a
          moz-do-not-send="true"
          href="https://bugs.openjdk.java.net/browse/JDK-8049198"
          title="[macosx] Incorrect thread access when showing splash
          screen"><strike>JDK-8049198</strike></a> and <a
          moz-do-not-send="true"
          href="https://bugs.openjdk.java.net/browse/JDK-8043869"
          title="[macosx] java -splash does not honor @2x hi dpi
          notation for retina support"><strike>JDK-8043869</strike></a>.
        Because if I try to revert them back I should change more files
        which I consider will be danger.<br>
      </tt></blockquote>
    <tt>The fix which broke the splash screen:<br>
      <a class="moz-txt-link-freetext" href="http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/fb3f4212427f">http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/fb3f4212427f</a><br>
      <br>
      Suggested fix:<br>
      src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m<br>
      @@ -129,15 +129,11 @@<br>
       char* SplashGetScaledImageName(const char* jar, const char* file,<br>
                                      float *scaleFactor) {<br>
           NSAutoreleasePool *pool = [NSAutoreleasePool new];<br>
           *scaleFactor = 1;<br>
           char* scaledFile = nil;<br>
      - __block float screenScaleFactor = 1;<br>
      -<br>
      - [ThreadUtilities performOnMainThreadWaiting:YES block:^(){<br>
      - screenScaleFactor = [SplashNSScreen() backingScaleFactor];<br>
      - }];<br>
      + float screenScaleFactor = 1;<br>
       <br>
           if (screenScaleFactor > 1) {<br>
               NSString *fileName = [NSString stringWithUTF8String:
      file];<br>
               NSUInteger length = [fileName length];<br>
               NSRange range = [fileName rangeOfString: @"."<br>
    </tt><tt><br>
    </tt>
    <blockquote cite="mid:5500EE72.8050804@oracle.com" type="cite">
      <pre class="moz-signature" cols="72">-- 
Best regards, Sergey. </pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Best regards, Sergey. </pre>
  </body>
</html>