JAL-3105 fix for focus transfer after window closed on OSX
authorJim Procter <jprocter@issues.jalview.org>
Fri, 7 Sep 2018 11:24:10 +0000 (12:24 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 7 Sep 2018 11:26:17 +0000 (12:26 +0100)
help/html/releases.html
lib/VAqua5.jar
src/jalview/gui/AquaInternalFrameManager.java

index a861901..82ec15d 100755 (executable)
@@ -151,6 +151,10 @@ li:before {
               and lower-case 'E' and 'H' do not automatically get
               treated as RNA secondary structure.
             </li>
+            <li>
+              <!-- JAL-3105 -->Mac Users: closing a window correctly
+              transfers focus to previous window on OSX
+            </li>
           </ul>
           <em>Java 10 Issues</em>
           <ul>
index b25e343..7b5c27b 100644 (file)
Binary files a/lib/VAqua5.jar and b/lib/VAqua5.jar differ
index 956c119..7cfac99 100644 (file)
@@ -152,11 +152,12 @@ public class AquaInternalFrameManager extends DefaultDesktopManager
         super.activateFrame(f);
       }
 
-      // If this is the first activation, add to child list.
-      if (fChildFrames.indexOf(f) == -1)
+      // add or relocate to top of stack
+      if (fChildFrames.indexOf(f) != -1)
       {
-        fChildFrames.addElement(f);
+        fChildFrames.remove(f);
       }
+      fChildFrames.addElement(f);
 
       if (fCurrentFrame != null && f != fCurrentFrame)
       {