Several problems with drag-and-drop in gtk4
I've found several problems with drag-and-drop in gtk4. My system uses the X11 backend. I found these problems in demos and example programs in gtkmm and gtkmm-documentation. They also occur in similar programs in gtk.
Dragging text from one program to another
Start 2 instances of tests/testdnd.
Drag text from the drag label to the drop label in the same instance. Succeeds.
Received "I'm Data!" in label
Drag text from the drag label in one instance to the drop label in the other instance. Fails.
(process:2815): Gtk-WARNING **: 15:52:35.170: Failed to receive drop data: Could not convert data from UTF8_STRING to gchararray
Drag the text to gedit. Fails, nothing is inserted.
All these tests succeed with the tests/testdnd program in gtk3.
Dragging an icon
In gtk3 it's possible to drag an icon from demos/icon-browser/gtk3-icon-browser to LibreOffice Writer. That's not possible to do from demos/icon-browser/gtk4-icon-browser in gtk4. The icon is dragged, but LibreOffice Writer rejects the drop.
Dragging rows in a GtkTreeView
In gtk3, tests/testtreeview, rows can be reordered by dragging and dropping them. That's not possible in gtk4.
An observation
gtk_icon_view_enable_model_drag_source() and gtk_tree_view_enable_model_drag_source()
have a GdkContentFormats *formats
parameter. The formats are saved. As far as I can
see in the source code, the saved formats are never used.