From 7073ae83d0b28ebd608619cae45fc1158d94e945 Mon Sep 17 00:00:00 2001 From: SomeoneWithAnInternetConnection <34518321+SomeoneWithAnInternetConnection@users.noreply.github.com> Date: Thu, 4 Jan 2018 22:33:31 -0500 Subject: [PATCH] Prevent cursor icon from getting stuck as the wrong shape Once its gotten close to the edge of the window, my cursor will usually get stuck as one of the resize arrows rather than change back to a normal cursor. It looks like Substance gets confused about what the last cursor was, and starts "restoring" one of the resize cursors, instead of the pointer, when the cursor moves back away from the edge of the window. Setting the cursor for the frame's LayeredPane fixes the problem. --- .../src/main/java/net/runelite/client/ui/ClientUI.java | 3 +++ 1 file changed, 3 insertions(+) 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 cbc8da8f6d..b3e911b107 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 @@ -28,6 +28,7 @@ import com.google.common.base.Strings; import java.applet.Applet; import java.awt.AWTException; import java.awt.BorderLayout; +import java.awt.Cursor; import java.awt.Dimension; import java.awt.Font; import java.awt.Frame; @@ -141,6 +142,8 @@ public class ClientUI extends JFrame new TitleBarPane(this.getRootPane(), (SubstanceRootPaneUI)this.getRootPane().getUI()).editTitleBar(this); setTitle(null); setIconImage(ICON); + // Prevent substance from using a resize cursor for pointing + getLayeredPane().setCursor(Cursor.getDefaultCursor()); setLocationRelativeTo(getOwner()); setResizable(true); setVisible(true);