I just came back to a project I hadn’t worked on lately and noticed that the drag n drop feature doesn’t fully work anymore, meaning dragging wav files from some folder or desktop onto a component of the plugin that inherits from FileDragAndDropTarget ofc. it works in the DAW, but the standalone build trys to block it. it shows that X cursor when you drag anywhere over the interface and isInterestedInFileDrag() is never even called. it behaves a bit like a standalone software that runs as an administrator, but i’m just running it from the debugger of visual studio, so idk why it does that. Oh btw, I recently updated JUCE to the latest develop. That’s why I’m posting this here. It might be that there have been recent changes to the standalone plugin-wrapper that caused this if I didn’t mess up anything myself.
I don’t think we’ve made any changes specifically to the drag-and-drop behaviour or to the standalone window, although there have been fairly significant changes to window handling in general which may have inadvertently broken things.
Testing here with the SamplerPlugin demo standalone, I’m able to drag a .wav file into the waveform view with no problems, whether using the JUCE titlebar or a native titlebar.
Some things to check:
- Does it work if you run your standalone plugin by double-clicking it in Explorer, instead of launching it under the VS debugger?
- Do you hit breakpoints placed in FileDropTarget::DragEnter and DragLeave in juce_Windowing_windows.cpp?
- If you test in the SamplerPlugin demo instead of in your own plugin, does drag and drop work there?
I just did that and it worked. but then I tried running it as a debugger again and shockingly that also worked!
But then I saved and ran visual studio from that button in the projucer and then built the plugin and it didn’t work anymore. could it be that there were recent changes to the projucer making it run visual studio as an admin or so?
edit: i actually ran the projucer as an admin. i have no idea why that was ticked lol. solved
