I want to zoom into a timeline, using an unbounded mouse drag.
At the end of the mouse drag, if I am careful not to move the mouse at all when I release the mouse click (
mouseUp without further
mouseMove), the mouse is “out” of the window :
every call to
nullptr, as if the window had lost it’s focus.
After a 1pixel mouseMove, everything returns to normal.
Do you know how to force the mouse to re-enter into the window ? I have tried
mouseInputSource.setScreenPosition() but this does not trigger any mouse event.
PS: at the
mouseUp end of the unbounded movement, I call
mouseInputSource::enableUnboundedMouseMovement(false) to trigger the unavoidable
setPosition caused by the unbounded movement, and then I call
mouseInputSource.setScreenPosition() to replace the mouse where I want (at the new position in the timeline). My theory is that the last known position of the mouseInputSource is still “outside” of the window since it was there at the end of the unbounded movement.