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

gui

#1

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?


#2

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.


#3

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


#4

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


#5

That is working!

Thank you, Jules.