Move handleURLEvent setEventHandler to init

main
Jay 2021-02-20 19:53:44 +00:00 committed by Sam Lantinga
parent 42607909a0
commit 0052339b66
1 changed files with 6 additions and 6 deletions

View File

@ -145,6 +145,12 @@ static void Cocoa_DispatchEvent(NSEvent *theEvent)
selector:@selector(localeDidChange:)
name:NSCurrentLocaleDidChangeNotification
object:nil];
[[NSAppleEventManager sharedAppleEventManager]
setEventHandler:self
andSelector:@selector(handleURLEvent:withReplyEvent:)
forEventClass:kInternetEventClass
andEventID:kAEGetURL];
}
return self;
@ -262,12 +268,6 @@ static void Cocoa_DispatchEvent(NSEvent *theEvent)
[NSApp activateIgnoringOtherApps:YES];
}
[[NSAppleEventManager sharedAppleEventManager]
setEventHandler:self
andSelector:@selector(handleURLEvent:withReplyEvent:)
forEventClass:kInternetEventClass
andEventID:kAEGetURL];
/* If we call this before NSApp activation, macOS might print a complaint
* about ApplePersistenceIgnoreState. */
[SDLApplication registerUserDefaults];