From 153b475301c022a875a2ef4bfed664644cdcae0c Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 Dec 2021 16:21:37 -0500 Subject: [PATCH] clientui: disable ui scale transform for client bounds on macos This appears unnecessary on macos and breaks the remember client position feature --- .../src/main/java/net/runelite/client/ui/ClientUI.java | 6 +++++- 1 file changed, 5 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 b99ebe437c..0cee8b636f 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 @@ -546,7 +546,11 @@ public class ClientUI // When Windows screen scaling is on, the position/bounds will be wrong when they are set. // The bounds saved in shutdown are the full, non-scaled co-ordinates. - if (scale != 1) + // On MacOS the scaling is already applied and the position/bounds are correct on at least + // - 2015 x64 MBP JDK11 Mohave + // - 2020 m1 MBP JDK17 Big Sur + // Adjusting the scaling further results in the client position being incorrect + if (scale != 1 && OSType.getOSType() != OSType.MacOS) { clientBounds.setRect( clientBounds.getX() / scale,