From 11040f3094ce6b52acb74764acd3ddaa03b6a31f Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 5 Jan 2006 00:10:00 +0000 Subject: Add comment block for new DND code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4738 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_dnd_x.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/fl_dnd_x.cxx b/src/fl_dnd_x.cxx index f3611c142..8c95e8043 100644 --- a/src/fl_dnd_x.cxx +++ b/src/fl_dnd_x.cxx @@ -125,6 +125,13 @@ int Fl::dnd() { if (local_window) { local_handle(FL_DND_ENTER, local_window); } else if (dndversion) { + // Send an X-DND message to the target window. In order to + // support dragging of files/URLs as well as arbitrary text, + // we look at the selection buffer - if the buffer starts + // with a common URI scheme, does not contain spaces, and + // contains at least one CR LF, then we flag the data as + // both a URI list (MIME media type "text/uri-list") and + // plain text. Otherwise, we just say it is plain text. if ((!strncmp(fl_selection_buffer[0], "file:///", 8) || !strncmp(fl_selection_buffer[0], "ftp://", 6) || !strncmp(fl_selection_buffer[0], "http://", 7) || -- cgit v1.2.3