Patch: Implements drag and drop for plugin windows on Linux

I’ve implemented drag and drop support in JUCE plugin windows on Linux. Previously you could not drop content from outside of the application into JUCE-based plugin windows. This patch fixes things by properly setting up an XdndProxy. Much of the inspiration came from reading the LinVst code.

For us, this gets drag and drop working for some hosts on Linux, specifically:

  • Bitwig
  • Traction

But does not work in:

  • Ardour
  • Reaper

I believe Reaper at one point did support drag and drop, and LinVst has code specifically to make things work with Reaper, but at the moment I’ve not found any examples of D&D working in Reaper. If anyone knows of any, I’d appreciate a note on such so I can look deeper.

I’m attaching the patch, and a screenshot of it working in Sitala (our app). The patch is currently based off of the 5.4.3 tag (as is our app), but could obviously be updated to master without much difficulty.

juce-xdndproxy.diff (5.5 KB)


Actually, I realize now looking at this patch that I don’t need to a getParent() function since I can just use parentWindow – but I haven’t removed it for now since I’m still hoping to get things working in Reaper, where at least in the LinVst code they set a proxy on the grandparent to get things working (though that’s not working for me at the moment).