[GTK3] Drag and drop from Plasma desktop not working.
I hope this is the right place to report this.
Steps to reproduce
- Open a GTK window such as GIMP or Image Viewer.
- Attempt to open a file using a drag and drop action from the KDE Plasma desktop. (As opposed to from a file manager)
Current behavior
The cursor changes to a disabled type and the file drop is not accepted.
Expected outcome
The file is dropped and opened by the application.
Version information
I tested using GTK 3.24.14 on Arch Linux.
Also received report from user using KDE Neon 5.18
Additional information
Drag and drops from file managers do work as expected.
I can replicate this in GIMP, Image Viewer etc, however I notice that Nautilus does not have this issue. Other toolkits function as expected.
Ref issue https://github.com/flathub/com.github.taiko2k.avvie/issues/2
Here's the code I use to make the Window accept file drops:
self.drag_dest_set(
Gtk.DestDefaults.MOTION
| Gtk.DestDefaults.HIGHLIGHT
| Gtk.DestDefaults.DROP,
[Gtk.TargetEntry.new("text/uri-list", 0, 80)],
Gdk.DragAction.COPY,
)