summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2006-01-05 00:10:00 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2006-01-05 00:10:00 +0000
commit11040f3094ce6b52acb74764acd3ddaa03b6a31f (patch)
tree847fb3c392db22a91aecb5c424dbb56a7f6352a4
parent3af3148a06181d6786e870dc2d0d6fdeed6b0d4d (diff)
Add comment block for new DND code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4738 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/fl_dnd_x.cxx7
1 files changed, 7 insertions, 0 deletions
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) ||