I am working on the gui for a new app. I have built a floating toolbox window that, much like any editor program, changes the cursor once a tool button has been clicked. I have created a singleton class which keeps track of the global state of the app and sets the cursor accordingly.
However, there is a strange bug:
When I click on my toolbox button (a separate document window from the main document window) then click on my main document, the mouse cursor changes back to the default cursor on mouseDown and won’t change to my desired custom cursor UNTIL I move the mouse outside of the component, then back in. This happens even though I am desperately trying to intercept every mouse action (mouseMove, mouseDown, etc), every focus change, everything I can think of to manually set and/or update the cursor. Also, every component in my app implements the getMouseCursor method. I even made my application class a globalFocusListener of my main document class, trying to manually change the cursor on every global focus change.
It’s a bit hard to describe so it’s best seen. I’ve made a compiled version (Mac OSX 10.5, leopard) of my gui and posted it at:
I decided on posting the compiled app rather than the code because the code would probably take a LOT longer to figure out as there are many classes/objects involved and I don’t have time to make a toy, simple version. You can also see the problem immediately when you use the app.
Is this a bug in JUCE or is it in my code? Is there a way to globally set the mouse cursor rather than per-component?