Dragging a file from the app with GLFW


I’m unfortunately very unexperienced as a programmer to be able to do this myself so I’m mentioning this idea here in case if anyone else is interested looking into this.

Basically, setting a drag and dropable file from the application. I know there are some programs that do this but I was not able to find much from this topic. Here’s the only thing I was able to find. Search for the title Initiating a drag and drop


Would love to see a function for this purpose in GLFW!


Hi @UkkoPekka,

Welcome to the GLFW forum

There is already basic drag and drop functionality available in GLFW and an issue for more advanced events.

Whilst the current API doesn’t expose being able to drag a file from one app to another, it would be possible to do something similar with the clipboard API by setting a string path with one app and retrieving that with the other. This would mean using CTRL+C, CTRL+V or similar rather than drag and drop but could work for your needs.

Hi dougbinks!

Thanks! That clipboard method is definitely one way to go. I might go with that for now.

This was mostly a suggestion for anyone interested to look at in the future. Having the ability to drag a file from the application to other as a save method could be very intuitive for small tools that do not use save file dialogs.