From 0a6d80abf73595499d6bfaaaa844cd110593576b Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 12 Feb 2020 13:08:29 -0500 Subject: [PATCH] mac: Wait a bit before activating app at startup. This is obnoxious and wrong, but the patch that activates the Dock before activating the app fixes the _menu_ not responding on Catalina, but the first window created by the app won't have keyboard focus without a small delay inserted. This obviously needs a better solution, but it gets it limping along correctly for now. --- src/video/cocoa/SDL_cocoaevents.m | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m index d2a5b98c1b9d3..0de74df3168da 100644 --- a/src/video/cocoa/SDL_cocoaevents.m +++ b/src/video/cocoa/SDL_cocoaevents.m @@ -244,6 +244,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification [i activateWithOptions:NSApplicationActivateIgnoringOtherApps]; break; } + SDL_Delay(300); /* !!! FIXME: this isn't right. */ [NSApp activateIgnoringOtherApps:YES]; }