Dragging files from nautilus to an extension widget

Howdy!
I’m developing a gnome extension and I need to handle dragged files from nautilus onto a widget. The acceptDrop function works only on components that are from the same app (gnome-shell).
If I implement the handleDragOver method, it gets invoked but with that I get a reference to a dummy actor and I’m not sure how to work with that. I also tried connecting to drag-begin and drag-end from Main.xdndHandler but that also doesn’t give me access to the dragged files.

Is this even possible to do with an extension, or do I need a real Gtk Application with a Gtk.DropTarget inside it?

Alternatively, is there a way to have a file selection dialog triggered from an extension? I poked around but found nothing at gjs.guide.

Any hints are much appreciated!

You can also try asking in the following matrix room.

#extensions:gnome.org

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.