Wingman / wingman

Wingman is an open source Old School RuneScape client.
http://wingman.github.io/docs
GNU Lesser General Public License v3.0
18 stars 2 forks source link

[BUG] OS X Cursor #4

Open jfpiv opened 8 years ago

jfpiv commented 8 years ago

There is a bug with the cursor on OS X. Sometimes when entering the client, a resize cursor appears rather than the default cursor. This does not appear to be a problem on Windows.

os x cursor bug (captured with phone as OS X screenshot does not include cursor)

alexanderhenne commented 8 years ago

Does the bug disappear after commenting out new ComponentBorderResizer(frame); in the Client class?

jfpiv commented 8 years ago

Yes, it does. But I can no longer resize the client.

jfpiv commented 8 years ago

Adding this line of code to the Client constructor fixes the problem for me:

framePanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
alexanderhenne commented 8 years ago

Testing on OS X, I could reproduce this bug.

I then tried reproducing it while having added your code line, and found that hovering over the title bar sometimes spawns the resizing cursor after having resized the window an amount of times: http://i.imgur.com/pPs9q4F.gifv (No idea why the resizing cursor is abnormally large in this GIF. It's not when I'm recording).

The problem probably lies in the ComponentBorderResizer class. I did some investigation in the class but so far couldn't find a fix that wouldn't introduce the bug on Windows instead.

jfpiv commented 8 years ago

The same happens for me. Setting the JMenuBar's cursor appears to fix that.

frame.getJMenuBar().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
mattthw commented 7 years ago

Linux here. Sometimes the resize cursor does not go away. For me it is specific to the window it happened in. So if it happens in settings the cursor will still be normal when settings is closed, but return to a resize cursor when settings is opened again.