changeset 39538:8477ce4d6628

8159152: Ctrl+F6, Ctrl+F5 doesn't work for iconified InternalFrame Reviewed-by: alexsch, psadhukhan Contributed-by: rajeev.chamyal@oracle.com
author rchamyal
date Wed, 29 Jun 2016 14:47:58 +0530
parents b2d4ed0ff6b9
children c6d88f43892c
files jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java jdk/test/javax/swing/JInternalFrame/Test6325652.java
diffstat 2 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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 ..
  */