[plt-scheme] Re: drag and drop in X

From: Johan Holmquist (holmisen at gmail.com)
Date: Tue Nov 28 20:23:32 EST 2006

Here is what I have learned:

XDND, being (or about to be) The Standard for drag-and-drop in X, is
the best choice to implement support for but is also hard to get
right. Thus many (most?) applications don't implement the protocol
properly. :(

The ROX desktop is taking drag-and-drop very seriously, so I tried dnd
with ROX-Filer and *fopp* -- it works! It supplies data for
"text/uri-list" and my scheme program now prints "DOD" when dropping
files on it (from ROX-Filer).

So it seems to work -- but I noticed two small bugs:

- When converting the "path" object (given to "on-drop-file") to a
string and printing, the string contains double newlines in the end.

- When dropping several files on the application, the "path" object
(given to "on-drop-file") will actually contain several paths,
separated by (in my case) double newlines. I guess the "path" object
is only supposed to hold a single path (!) so sending multiple paths
by dnd would not be possible for now. Then it would be nice if the uri
was trimmed off any ending newlines and multiple paths except the
first one, before being put in the "path"-object.

Anyway, thanks a lot, Matthew, for the dnd-implementation!
I hope XDND support in mred will be continued. :)


Posted on the users mailing list.