Hi Jules,
I have a component , where i have mouseEnter and mouseDrag overridden. If i set tooltip with some text on mouseEnter , while doing mouseDown i am getting callback on mouseDrag even when the mouse is not dragged…
Issue is , my component is draggable and will show some custom image as a drag image.
As it is coming to mousedrag on mousedown , it is showing the drag image without dragging… I can fix this issue by checking the drag distance on mouse drag … But want to know what is basically wrong …
Did you try the latest tip? I just fixed something like this a couple of days ago.
But regardless of that, you need to write your code to deal with mouse-drags properly. There’s no guarantee that no drag events will occur until the mouse moves - the OS may choose to send an event, or something in juce may trigger an event.
The correct way to handle it is to check MouseEvent::mouseWasClicked() to see decide whether the drag is just the mouse wobbling slightly during a normal click, or whether it’s actually a deliberate drag gesture.