Page 1 of 1

[Linux] Invisible Mouse Cursor

PostPosted: Sun Mar 10, 2013 3:52 pm
by randrew
As the topic says. Mouse cursor is invisible inside the game screen. Obviously game is unplayable. Tested with both Ender and Standard client, fullscreen yes/no.

Re: [Linux] Invisible Mouse Cursor

PostPosted: Sun Mar 10, 2013 4:45 pm
by randrew
Took a quick look into HavenPanel.java (Ender):

Code: Select all
public HavenPanel(int w, int h, GLCapabilitiesChooser cc) {
>-------super(stdcaps(), cc, null, null);
>-------setSize(this.w = w, this.h = h);
>-------newui(null);
>-------initgl();
>-------if(Toolkit.getDefaultToolkit().getMaximumCursorColors() >= 256)
>-------    cursmode = "awt";
>-------setCursor(Toolkit.getDefaultToolkit().createCustomCursor(TexI.mkbuf(new Coord(1, 1)), new java.awt.Point(), "")
    }


The bolded check *will* fail, as getMaximumCursorColors() returns 2 under Unix systems. I don't see any fallback code, so the most likely culprit is that the cursor without awt capabilities does not work.

Re: [Linux] Invisible Mouse Cursor

PostPosted: Sun May 17, 2015 6:42 am
by Klick3R
I got this problem, and i thought after so many months/year(s) it would be fixed?
sorry for being a necro but this was the only thing i could come up with.

i used to play 2-3 years ago

Re: [Linux] Invisible Mouse Cursor

PostPosted: Fri Jun 19, 2015 10:13 pm
by biscuitofdoom
Same here. Arch linux 64 bit. Open jdk and open radeon driver and no mouse cursor :evil:

Re: [Linux] Invisible Mouse Cursor

PostPosted: Fri Jun 19, 2015 10:18 pm
by loftar
Well, the earlier analysis is wrong, at least; the fallback code is the default case, where the client draws the cursor manually. If that doesn't happen, I can only assume that Java for some reason does not return 2 maximum colors on your system but yet fails to set the hardware cursor properly. I can't say I know why that would happen, though; I only use Linux and have never had a problem with this.

Could you check what Toolkit.getDefaultToolkit().getMaximumCursorColors() actually returns on your system?

Re: [Linux] Invisible Mouse Cursor

PostPosted: Fri Jun 19, 2015 10:19 pm
by Icon
No problems on Ubuntu. Shot in the dark here, but you using java or icedtea?

Re: [Linux] Invisible Mouse Cursor

PostPosted: Fri Jun 19, 2015 10:20 pm
by loftar
Icon wrote:Shot in the dark here, but you using java or icedtea?

IcedTea uses OpenJDK though, so that shouldn't make a difference.

Re: [Linux] Invisible Mouse Cursor

PostPosted: Fri Jun 19, 2015 10:38 pm
by biscuitofdoom
Icon wrote:No problems on Ubuntu. Shot in the dark here, but you using java or icedtea?

Switched to oracle java but still no cursor. It shows up when loading the game but dissapears few seconds later.