Prevent Cocoa from sending us open file events from command line args
We process command line args ourselves, thank you very much.
This commit is contained in:
parent
077097c112
commit
399c700939
@ -546,8 +546,12 @@ int _glfwPlatformInit(void)
|
|||||||
if (_glfw.hints.init.ns.chdir)
|
if (_glfw.hints.init.ns.chdir)
|
||||||
changeToResourcesDirectory();
|
changeToResourcesDirectory();
|
||||||
|
|
||||||
|
NSDictionary* defaults = @{
|
||||||
// Press and Hold prevents some keys from emitting repeated characters
|
// Press and Hold prevents some keys from emitting repeated characters
|
||||||
NSDictionary* defaults = @{@"ApplePressAndHoldEnabled":@NO};
|
@"ApplePressAndHoldEnabled": @NO,
|
||||||
|
// Dont generate openFile events from command line arguments
|
||||||
|
@"NSTreatUnknownArgumentsAsOpen": @"NO",
|
||||||
|
};
|
||||||
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
|
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter]
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user