Don't force focus on tray icon click on macOS when already focused

This commit is contained in:
testing-ongithub
2022-01-03 15:08:27 -06:00
committed by Adam
parent 060cb31a6c
commit b0234eb013

View File

@@ -184,7 +184,7 @@ public class SwingUtil
@Override
public void mouseClicked(MouseEvent e)
{
if (OSType.getOSType() == OSType.MacOS)
if (OSType.getOSType() == OSType.MacOS && !frame.isFocused())
{
// On macOS, frame.setVisible(true) only restores focus when the visibility was previously false.
// The frame's visibility is not set to false when the window loses focus, so we set it manually.