8159152: Ctrl+F6, Ctrl+F5 doesn't work for iconified InternalFrame
authorrchamyal
Wed, 29 Jun 2016 14:47:58 +0530
changeset 39538 8477ce4d6628
parent 39537 b2d4ed0ff6b9
child 39539 c6d88f43892c
8159152: Ctrl+F6, Ctrl+F5 doesn't work for iconified InternalFrame Reviewed-by: alexsch, psadhukhan Contributed-by: rajeev.chamyal@oracle.com
jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java
jdk/test/javax/swing/JInternalFrame/Test6325652.java
--- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java	Wed Jun 29 11:38:29 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java	Wed Jun 29 14:47:58 2016 +0530
@@ -194,17 +194,15 @@
             int layer = JLayeredPane.getLayer(f);
             JLayeredPane.putLayer(desktopIcon, layer);
         }
-
+        d.setComponentOrderCheckingEnabled(true);
+        c.remove(f);
+        c.add(desktopIcon);
         if (findNext) {
             if (d.selectFrame(true) == null) {
                 // The icon is the last frame.
                 f.restoreSubcomponentFocus();
             }
         }
-        d.setComponentOrderCheckingEnabled(false);
-        c.remove(f);
-        c.add(desktopIcon);
-        d.setComponentOrderCheckingEnabled(true);
         c.repaint(f.getX(), f.getY(), f.getWidth(), f.getHeight());
     }
 
--- a/jdk/test/javax/swing/JInternalFrame/Test6325652.java	Wed Jun 29 11:38:29 2016 +0300
+++ b/jdk/test/javax/swing/JInternalFrame/Test6325652.java	Wed Jun 29 14:47:58 2016 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009,2016 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,8 @@
 
 /*
  * @test
- * @bug 6325652
+ * @bug 6325652 8159152
  * @summary Tests keyboard shortcuts
- * @author Sergey Malenkov
  * @library ..
  */