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

Swing Popups don't get hidden on Alt+Tab

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      On Windows OS all popups are get hidden when you press Alt+Tab,
      I think it should happen on GTK as well

      This bug is very visible with the JTrayIcon draft implementation

      Expected:
      You press Alt+Tab and popups are closed

      Actual:
      Popups stay open

      To check it use the following test:

      import javax.swing.*;

      public class PopupTest {

          private static void createGui() {
              final JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

              JPopupMenu menu = new JPopupMenu("Menu");
              menu.add(new JMenuItem("MenuItem"));
              menu.add(new JMenuItem("MenuItem"));
              menu.add(new JMenuItem("MenuItem"));
              menu.add(new JMenuItem("MenuItem"));
              menu.add(new JMenuItem("MenuItem"));

              JPanel panel = new JPanel();
              panel.setComponentPopupMenu(menu);
              frame.add(panel);

              frame.setSize(200, 200);
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
          }

          public static void main(String[] args) throws Exception {
              SwingUtilities.invokeLater(new Runnable() {
                  public void run() {
                      PopupTest.createGui();
                  }
              });
          }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                son Oleg Sukhodolsky (Inactive)
                Reporter:
                alexp Alexander Potochkin (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: