From b0234eb01315b42b83a9ad04e2f831ad12e26e27 Mon Sep 17 00:00:00 2001 From: testing-ongithub <96100526+testing-ongithub@users.noreply.github.com> Date: Mon, 3 Jan 2022 15:08:27 -0600 Subject: [PATCH] Don't force focus on tray icon click on macOS when already focused --- .../src/main/java/net/runelite/client/util/SwingUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/util/SwingUtil.java b/runelite-client/src/main/java/net/runelite/client/util/SwingUtil.java index 08bd9613a4..2f42b94e64 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/SwingUtil.java +++ b/runelite-client/src/main/java/net/runelite/client/util/SwingUtil.java @@ -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.