Commit a3e073d8 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Apparently MacOS X will sometimes pass command line arguments to a Cocoa

 app as an openFile() message, so we have to make sure we were launched from
 the Finder before accepting these as drag'n'drop documents, or they will just
 duplicate what's already in argc/argv.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401126
parent 447103bb
......@@ -245,6 +245,9 @@ static void CustomApplicationMain (argc, argv)
*/
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
{
if (!gFinderLaunch) /* MacOS is passing command line args. */
return FALSE;
if (gCalledAppMainline) /* app has started, ignore this document. */
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment