Version: (using KDE KDE 3.3.1) Installed from: SuSE RPMs OS: Linux According to XDND, when drag & dropping, a TARGETS Atom listing all available targets (as a list of other Atom s, generally named after their mime type) is provided. But, nothing is provided. Here is how I get targets, using Gtk/Gdk; this works with Gtk, Mozilla, and Motif; but outputs only null strings with KDE. //in a drag-drop signal handler GtkClipboard *cboard = gtk_clipboard_get(gdk_drag_get_selection(drag_context)); gtk_clipboard_request_targets(cboard, print_received_targets, NULL); //Try it another way: gtk_clipboard_request_contents(cboard, gdk_atom_intern("TARGETS", FALSE), print_data_from_clipboard, NULL); //With: void print_data_from_clipboard(GtkClipboard * clipboard, GtkSelectionData * selection_data, gpointer data) { g_printf("print_data_from_clipboard\n"); print_gtk_selection_data(selection_data); } //And: void print_gtk_selection_data(GtkSelectionData * seldat) { gchar *as_text = gtk_selection_data_get_text(seldat); if (as_text) { g_printf("As utf-8 text: %s\n", as_text); g_free(as_text); } g_printf("As raw bytes:\n"); int i; for (i = 0; i < seldat->length; i++) { g_printf("%c", seldat->data[i]); } g_printf("\n"); }
It seems TARGETS is really not provided, but I don't see why you don't simply read the DND types normally like everybody else does (XdndTypeList).
You're right, the XDND spec doesn't require TARGETS to be set, though it mentions it (http://freedesktop.org/Standards/XDND). So the title is a bit over-alarming. It would still be a good idea to support it. The underlying object is an X selection in both cases, and these usually support TARGETS. This would make drag and drop consistent with other objects using X selections, like clipboards - drag and dropping is just creating a temporary clipboard.
*** This bug has been marked as a duplicate of 89451 ***
Not really a duplicate of #89451.
Hello, Can you still reproduce the bug with the latest KDE 4 release? Thanks.
Maybe this bug is connected to bug 36297 see http://bugs.kde.org/show_bug.cgi?id=36297
Apparently not. :)