Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6853697

Windows 7: windows restored via "shake" gesture come back in wrong z-order

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • P4
    • None
    • 7
    • client-libs
    • x86
    • windows_7

    Description

      FULL PRODUCT VERSION :
      java version "1.7.0-ea"
      Java(TM) SE Runtime Environment (build 1.7.0-ea-b57)
      Java HotSpot(TM) Client VM (build 16.0-b02, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7100]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      This is specific to Windows 7.

      A DESCRIPTION OF THE PROBLEM :
      Windows 7 has a new "shake" gesture which allows you both to minimize all other windows for a given application, as well as restore those other windows. For example, if I "shake" the MSPaint window, all the other windows are minimized. If I then shake it again, all the other windows are restored.

      For the most part this works with Java windows, except when it comes to the z-order of frames and dialogs. If you shake a dialog that has a parent frame, all other windows are minimized -- the dialog and frame remain. If you shake the dialog to restore the other windows, however, those other windows will end up appearing *in front* of the parent frame. The Java frame is tucked behind other applications.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Open a few applications under Windows 7 (e.g., MSPaint, Internet Explorer, and a DOS prompt). Stack these windows up in a cascading pattern. Then run the given Java application, which opens another frame. Put this frame on top of the stack. Click the button in the frame to open a modal dialog. Enlarge this window and put it in front of the frame.

      Now shake the modal dialog (click and hold its title bar and shake it left and right). All the other windows (excluding the parent frame) should be minimized.

        Release the mouse, then click and shake the modal dialog again. The windows will be restored, but the parent frame will be *behind* one of the application windows. This is incorrect and does not happen with other applications.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Expected the windows to be restored in the exact position as they had been (i.e., parent frame on top of other windows).
      ACTUAL -
      Parent frame is tucked behind one of the other application windows.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.event.*;

      /* g553069 */
      public class FrameTest {
          public static void main(String[] args) {
              final JFrame f = new JFrame("Frame");
              f.add(new JButton(new AbstractAction("Click Me") {
                      public void actionPerformed(ActionEvent event) {
                              showDialog(f);
                      }
              }), BorderLayout.SOUTH);
              f.setSize(640, 480);
              f.setLocationRelativeTo(null);
              f.setVisible(true);
          }

          private static void showDialog(JFrame f) {
              JDialog d = new JDialog(f);
              d.setTitle("Dialog");
              d.setSize(200, 150);
              d.setLocationRelativeTo(null);
              d.setVisible(true);
          }
      }
      ---------- END SOURCE ----------

      Attachments

        Activity

          People

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: