I’m working on (a bit of) gesture parsing on a Component (inherited from TextButton).
A long “mouse down” should initiate a drag, indicated by a dragImage popping up.
I need to distinguish immediate drags from these after a short hold.
So I activate autorepeat in
mouseDown(), and can handle everything in the
mouseDrag() routine, regardless if it’s the dragging distance or duration that triggers the drag.
This works fine with mouse input.
However, when I touch the Component (preferred input), the line
if (s->isDragging() && ComponentPeer::getCurrentModifiersRealtime().isAnyMouseButtonDown())
MouseInputSource::SourceList doesn’t get passed, because no buttons are pressed (obviously my finger has none that could be )
As a result, no fake moves are triggered.
Is this on purpose, Is there an easier way to achieve this?
Am I reinventing the wheel?
I’m on Windows10 (Surface pro 4).
By the way: a “long tap” here usually ends up with a right click - shouldn’t the right mouse button be virtually down?
Thanks for helping!