mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 21:42:18 +00:00
os x: handle multiple dropped files on the window
Should fix #3076 (partially). Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
parent
949247d6e6
commit
ed695ce689
@ -358,8 +358,13 @@
|
||||
{
|
||||
NSPasteboard *pboard = [sender draggingPasteboard];
|
||||
if ([[pboard types] containsObject:NSURLPboardType]) {
|
||||
NSURL *file_url = [NSURL URLFromPasteboard:pboard];
|
||||
[self.adapter handleFilesArray:@[[file_url absoluteString]]];
|
||||
NSArray *pbitems = [pboard readObjectsForClasses:@[[NSURL class]]
|
||||
options:@{}];
|
||||
NSMutableArray* ar = [[[NSMutableArray alloc] init] autorelease];
|
||||
for (NSURL* url in pbitems) {
|
||||
[ar addObject:[url path]];
|
||||
}
|
||||
[self.adapter handleFilesArray:ar];
|
||||
return YES;
|
||||
} else if ([[pboard types] containsObject:NSFilenamesPboardType]) {
|
||||
NSArray *pbitems = [pboard propertyListForType:NSFilenamesPboardType];
|
||||
|
Loading…
Reference in New Issue
Block a user