Setting the MouseCursor in a Drag and Drop Scenario [SOLVED]



Setting the MouseCursor on a DragAndDropTarget/FileDragAndDropTarget while items are being dragged does not work.

I could narrow it down to the part where the MouseInputSourceInternal::componentUnderMouse doesn’t gets updated while dragging.
Is this intended? When so, how can i archieve setting the mouse cursor in this scenario?


Yes, when you’re dragging, the mouse is captured by the component you clicked on, so it won’t attempt to look at any components that are being mouse-overed. But if you change the cursor of the original component, that should make it update.


That make sense for dragging JUCE components, but what is the original component for an external drag and drop coming from the finder/explorer?


Oh, I see… right. Bit more tricky then! I guess you could get the main MouseSource and then call showMouseCursor on it…?


That is working!

Thank you, Jules.