Hello!
Fairly new here, so please bear with me!
I noticed that whilst if I simultaneously scroll the mouse whilst mouse dragging (either left or right button down), the x and y position of the event seems to jump wildly. For example, here are some logged values in juce::Component::mouseDrag.
mouseEvent.x = 243, mouseEvent.y=215
mouseEvent.x = 243, mouseEvent.y=215
mouseEvent.x = 463, mouseEvent.y=157 <------ Sudden jump?
mouseEvent.x = 243, mouseEvent.y=215
mouseEvent.x = 463, mouseEvent.y=157 <------ Another one?
mouseEvent.x = 243, mouseEvent.y=215
Digging into Juce a little bit, I think what’s happening is that when the mouse wheel is moved in the middle of a drag, MouseInputSourceImpl::getTargetForGesture seems to call triggerFakeMove, which I think triggers a fake mouseDrag . But this seems to be slightly delayed as triggerFakeMoveis asynchronous?
This is awkward for us as we’d ideally like for the mouse wheel to not interfere with mouseDrag, and we do already have dedicated functionality for mouse wheel events in mouseWheelMove.
Is there best practice for handling this situation?
If relavant, I’m developing on MacOS.
Thanks!