The comments say that DragAndDropContainer::performExternalDragDropOfFiles() is synchronous… but it isn’t.
My real issue…
(On MacOS)
I have a screen repaint issue if you start a drag from a TableListBox and drop it (drag, stop dragging and lift your mouse finger) on the plug-in UI… Say on the TableListBox itself… it won’t delete the DragImageComponent until you move the mouse… and DragAndDropContainer::dragOperationEnded() is triggered only after a mouse move… so I can’t try:
It happens if you call DragAndDropContainer::performExternalDragDropOfFiles() in the TableListBox’s getDragSourceDescription() method… and is only a MacOS issue.
To isolate the cause, by temporarily bypassing the code below fixes the issue…
I created a thread for this same issue, simply asking if the documentation is wrong or if the implementation on MAC indeed is wrong and if this would be fixed but i was pointed to join this thread instead.
It would help immensely if the implementation on MAC is the same as on WIN(where it works as the documentation states)
Currently we do a lot of ugly/unstable hacks that could be removed if this would be fixed.
Thanks @Rail_Jon_Rogut. This commit has updated the docs to reflect that the operation is asynchronous and has unified the behaviour across all platforms (see this post) and this commit should fix the missing mouse up causing your screen repaint issue.
I’m getting a small compilation error when building for i386 instead of x86_64 with your latest commit (something like can’t convert NSPoint to CGPoint ) : https://github.com/WeAreROLI/JUCE/commit/2fd19af539cfd3748249ba40b3a83076713a7e51
Replacing the p argument in the CGEventCreateMouseEvent() call by CGPointMake(p.x, p.y) fixes it