Hello.
I’d like to hide the mouse cursor while dragging a slider and show it again at its original (mouseDown) position on mouseUp().
As others have suggested (MouseInputSource::enableUnboundedMouseMovement behaviour and Locking the mouse and making it invisible when using a slider?), I enable unbounded mouse movement in mouseDown() and disable it mouseUp(). I also reset the mouse position in mouseUp() using Desktop::getInstance().getMainMouseSource().setScreenPosition().
The mouse position doesn’t seem update immediately - it takes a short moment. The result is that:
mouseEnter()will fire on another component if the invisible/unbounded mouse position happens to be over that component onmouseUp().- The cursor occasionally is made visible in its unbounded position and flickers when moving to the desired position.
Is this expected behaviour? Is there a way to set the mouse position more synchronously/immediately? I tried calling forceMouseCursorUpdate() after setting the position but this doesn’t seem to help. I’m using JUCE 7.0.10 and have the same behaviour on macOS and Windows.
Thanks!
