diff options
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 495806c97..0c1736a86 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -4001,7 +4001,12 @@ static NSImage *defaultDragImage(int *pwidth, int *pheight) return image; } -int Fl::dnd(void) +int Fl::dnd() +{ + return Fl_X::dnd(0); +} + +int Fl_X::dnd(int use_selection) { CFDataRef text = CFDataCreate(kCFAllocatorDefault, (UInt8*)fl_selection_buffer[0], fl_selection_length[0]); if (text==NULL) return false; @@ -4018,7 +4023,7 @@ int Fl::dnd(void) int width, height; NSImage *image; - if ( dynamic_cast<Fl_Input_*>(w) != NULL || dynamic_cast<Fl_Text_Display*>(w) != NULL) { + if (use_selection) { fl_selection_buffer[0][ fl_selection_length[0] ] = 0; image = imageFromText(fl_selection_buffer[0], &width, &height); } else { |
