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();
}
});
}
}