Does MouseCursor (const Image &image, int hotSpotX, int hotSpotY) work on Linux?

Does MouseCursor (const Image &image, int hotSpotX, int hotSpotY) work on Linux? I can’t get it to work, the cursor doesn’t change. Stays with the previous cursor.

It should do… certainly if you look in the code, the linux stuff uses custom mouse cursors internally so I guess it must at least have worked on some systems for us to have done that!

I found the issue. I was creating my mouse cursors in a singleton that gets initialized early on. This works on Windows and Mac, but not Linux. Now I don’t create my mouse cursors until I need them for the first time and then cache them. This solves the issue.

1 Like

Hello all, we’ve encountered this issue too - creating MouseCursors too early on in Linux with Juce 5+ means we get blank or even the wrong image when using them. By creating the cursors on demand as per @RolandMR’s work around things are OK. Be nice if there was a fix but not essential.

Just sayin’…

Ta Chris - @ed95 is up-to-the-elbow in linux stuff right now so maybe a good time for him to look into this one…

Much obliged

Yep, I’ll take a look at this.

Should be fixed here:

Stupid question, purely out of curiosity: why the sudden focus on Linux? Is there a specific reason?

We’ve been doing some work on adding VST3 support to Linux and as a result have been cleaning up bits of the code as we go.