cocoa: calling finishLaunching explicitly on AppInit rather than from run loop

git-svn-id: trunk@62433 -
This commit is contained in:
dmitry 2019-12-23 13:04:31 +00:00
parent f41b9adc7e
commit c620145935
2 changed files with 3 additions and 9 deletions

View File

@ -86,7 +86,6 @@ type
modals : NSMutableDictionary;
inputclient : TCocoaInputClient;
inputctx : NSTextInputContext;
isfinishLaunch: Boolean;
procedure dealloc; override;
{$ifdef COCOALOOPOVERRIDE}

View File

@ -41,6 +41,9 @@ begin
FNSApp := TCocoaApplication(TCocoaApplication.sharedApplication);
FNSApp_Delegate := TAppDelegate.alloc.init;
FNSApp.setDelegate(FNSApp_Delegate);
{$ifdef COCOALOOPOVERRIDE}
FNSApp.finishLaunching;
{$endif}
// Sandboxing
lDict := NSProcessInfo.processInfo.environment;
@ -81,14 +84,6 @@ var
event: NSEvent;
pool:NSAutoReleasePool;
begin
{$ifdef COCOALOOPOVERRIDE}
if not fNSApp.isfinishLaunch then
begin
FNSApp.finishLaunching;
FNSApp.isfinishLaunch := true;
end;
{$endif}
repeat
pool := NSAutoreleasePool.alloc.init;
{$ifdef BOOLFIX}