diff options
| -rw-r--r-- | src/fl_dnd_x.cxx | 7 |
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) || |
