From 2cc34b9ece9979a05968c729ba3026463e318413 Mon Sep 17 00:00:00 2001 From: LlemonDuck Date: Thu, 12 May 2022 20:58:06 -0700 Subject: [PATCH] clientui: setResizable after setVisible Prevents an issue with clients being resizable with toolbar-less means in some environments (e.g. double clicking title bar on macos). Honestly I'm not entirely sure why this is ignored if the window isn't visible, rather than being propagated to the window manager when the window is shown, but I guess Swing isn't that smart (like always). I originally found the information on [this SO answer](https://stackoverflow.com/a/14884056) and it seemed to resolve the issue. Closes #14235 --- .../src/main/java/net/runelite/client/ui/ClientUI.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java index 20a2f378d1..42de5fc510 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java @@ -488,7 +488,7 @@ public class ClientUI } // Update config - updateFrameConfig(true); + updateFrameConfig(false); // Create hide sidebar button @@ -596,6 +596,8 @@ public class ClientUI // Show frame frame.setVisible(true); + // On macos setResizable needs to be called after setVisible + frame.setResizable(!config.lockWindowSize()); frame.toFront(); requestFocus(); log.info("Showing frame {}", frame);