when I click and hold mouse for a half second (approx.) or more, the MouseEvent i get at mouseUp callback has wasMovedSinceMouseDown flag set to true even though I’m pretty sure I didn’t moved the mouse (tested many times with mouse off the table). Everything is ok if the mouse click is shorter.
Maybe it’s caused by MouseInputSourceInternal::isDragging() which returns true if isAnyMouseButtonDown() ?
Unfortunately getDistanceFromDragStart() returns a diff of dragStart and dragEnd postitions which doesn’t cover the case where user drags but returns to dragStart position (eg. when using dragscroll).
mouseWasDraggedSinceMouseDown() indicates that the user is attempting a drag gesture and the event isn’t just a simple click, so it will return true if the mouse has moved significantly or if it has been held down for a significant period of time.
If you are just interested in whether the mouse has been moved since mouse down then you can use the MouseInputSource::hasMovedSignificantlySincePressed() method, accessing it through the source member of the MouseEvent.
the doc should be amended then. atm it says : It will return true if the user has dragged the mouse more than a few pixels from the place where the mouse-down occurred.