tray: Support file-drop from OS X Dock
authorNishanth Shanmugham <nishanth.gerrard@gmail.com>
Tue, 29 Dec 2015 09:25:21 +0000 (03:25 -0600)
committerNishanth Shanmugham <nishanth.gerrard@gmail.com>
Tue, 29 Dec 2015 09:27:59 +0000 (03:27 -0600)
commit2bbf86c524d8d5b4dbf09a48246eaac8767cdafc
tree6f95dfe5abdc02574baabc988db1fe74d0575fb6
parent5f3c6107d5db1367e8a04ff25457f429e947d65b
tray: Support file-drop from OS X Dock

A long-standing Apple bug does not call `prepareForDragOperation:sender`
for file drag-and-drop operations from the Dock. So we manually
call our custom `handleDrop:sender` for all drag-and-drop cases (that
is, from the Dock and from Finder).

References to the bug in question:
- http://stackoverflow.com/q/9534543/3309046
- http://openradar.appspot.com/radar?id=1745403

However, we still need to return YES from `prepareForDragOperation:sender`,
otherwise the "drag failed" animation occurs. For the same reason, we also
return YES from `performDragOperation:sender`.
atom/browser/ui/tray_icon_cocoa.mm