Skip to content

Commit e9b4151

Browse files
committed
...
1 parent 1ff9165 commit e9b4151

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

glfw/cocoa_window.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,6 +1718,14 @@ - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
17181718
else [uri_list appendString:url.absoluteString];
17191719
}
17201720
data = [uri_list dataUsingEncoding:NSUTF8StringEncoding];
1721+
} else {
1722+
window->ns.drop_data.file_promise_mapping[@(mime)] = @[[NSNull null], [NSNull null], [NSNull null]];
1723+
// TODO: store all file promise based items that conform to UTTypeFileURL into a temp dir
1724+
// and once that's complete, generate a response with file:// URLs pointing to the items in that temp dir
1725+
// This must be done in the background but remember to send the GLFW_DROP_DATA_AVAILABLE event on main thread.
1726+
// The temporary directory must live until the next drop event for this window starts.
1727+
// It must also be deleted when the window is destroyed.
1728+
return 0;
17211729
}
17221730
} else if (strcmp(mime, "text/plain") == 0 || strcmp(mime, "text/plain;charset=utf-8") == 0) {
17231731
NSArray* strings = [pasteboard readObjectsForClasses:@[[NSString class]] options:nil];

0 commit comments

Comments
 (0)