Check for CR LF and no spaces in addition to starting with a URI prefix.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4737 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
c4a0b7f056
commit
3af3148a06
@ -125,17 +125,19 @@ int Fl::dnd() {
|
|||||||
if (local_window) {
|
if (local_window) {
|
||||||
local_handle(FL_DND_ENTER, local_window);
|
local_handle(FL_DND_ENTER, local_window);
|
||||||
} else if (dndversion) {
|
} else if (dndversion) {
|
||||||
if (strncmp(fl_selection_buffer[0], "file:///", 8) &&
|
if ((!strncmp(fl_selection_buffer[0], "file:///", 8) ||
|
||||||
strncmp(fl_selection_buffer[0], "ftp://", 6) &&
|
!strncmp(fl_selection_buffer[0], "ftp://", 6) ||
|
||||||
strncmp(fl_selection_buffer[0], "http://", 7) &&
|
!strncmp(fl_selection_buffer[0], "http://", 7) ||
|
||||||
strncmp(fl_selection_buffer[0], "https://", 8)) {
|
!strncmp(fl_selection_buffer[0], "https://", 8)) &&
|
||||||
// Send plain text...
|
!strchr(fl_selection_buffer[0], ' ') &&
|
||||||
fl_sendClientMessage(target_window, fl_XdndEnter, source_window,
|
strstr(fl_selection_buffer[0], "\r\n")) {
|
||||||
dndversion<<24, XA_STRING, 0, 0);
|
|
||||||
} else {
|
|
||||||
// Send file/URI list...
|
// Send file/URI list...
|
||||||
fl_sendClientMessage(target_window, fl_XdndEnter, source_window,
|
fl_sendClientMessage(target_window, fl_XdndEnter, source_window,
|
||||||
dndversion<<24, fl_XdndURIList, XA_STRING, 0);
|
dndversion<<24, fl_XdndURIList, XA_STRING, 0);
|
||||||
|
} else {
|
||||||
|
// Send plain text...
|
||||||
|
fl_sendClientMessage(target_window, fl_XdndEnter, source_window,
|
||||||
|
dndversion<<24, XA_STRING, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user