mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-03-07 16:56:59 +01:00
Move handleURLEvent setEventHandler to init
This commit is contained in:
parent
42607909a0
commit
0052339b66
@ -145,6 +145,12 @@ static void Cocoa_DispatchEvent(NSEvent *theEvent)
|
|||||||
selector:@selector(localeDidChange:)
|
selector:@selector(localeDidChange:)
|
||||||
name:NSCurrentLocaleDidChangeNotification
|
name:NSCurrentLocaleDidChangeNotification
|
||||||
object:nil];
|
object:nil];
|
||||||
|
|
||||||
|
[[NSAppleEventManager sharedAppleEventManager]
|
||||||
|
setEventHandler:self
|
||||||
|
andSelector:@selector(handleURLEvent:withReplyEvent:)
|
||||||
|
forEventClass:kInternetEventClass
|
||||||
|
andEventID:kAEGetURL];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
@ -262,12 +268,6 @@ static void Cocoa_DispatchEvent(NSEvent *theEvent)
|
|||||||
[NSApp activateIgnoringOtherApps:YES];
|
[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
|
/* If we call this before NSApp activation, macOS might print a complaint
|
||||||
* about ApplePersistenceIgnoreState. */
|
* about ApplePersistenceIgnoreState. */
|
||||||
[SDLApplication registerUserDefaults];
|
[SDLApplication registerUserDefaults];
|
||||||
|
Loading…
Reference in New Issue
Block a user