Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cocoa: Fix command line apps' menu bar not working on macOS Catalina.
Fixes Bugzilla #4937.
  • Loading branch information
icculus committed Jan 27, 2020
1 parent 059de38 commit c7e1b28
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/video/cocoa/SDL_cocoaevents.m
Expand Up @@ -238,6 +238,11 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification
* of here. https://bugzilla.libsdl.org/show_bug.cgi?id=3051
*/
if (!SDL_GetHintBoolean(SDL_HINT_MAC_BACKGROUND_APP, SDL_FALSE)) {
/* Get more aggressive for Catalina: activate the Dock first so we definitely reset all activation state. */
for (NSRunningApplication *i in [NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.apple.dock"]) {
[i activateWithOptions:NSApplicationActivateIgnoringOtherApps];
break;
}
[NSApp activateIgnoringOtherApps:YES];
}

Expand Down

0 comments on commit c7e1b28

Please sign in to comment.