From bc6a923c4cae169b4b22e23c89d876880f340e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Tue, 31 Jul 2018 17:55:11 +0200 Subject: [PATCH] macOS: fix crash on startup. Added missing @synthesize acceptsFirstResponder; Replaced generic ApplicationDelegate in MainMenu.xib --- res/cocoa/MainMenu.xib | 2 +- src/platform/guimac.mm | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/res/cocoa/MainMenu.xib b/res/cocoa/MainMenu.xib index b1951c40..38db0d97 100644 --- a/res/cocoa/MainMenu.xib +++ b/res/cocoa/MainMenu.xib @@ -7,7 +7,7 @@ - + diff --git a/src/platform/guimac.mm b/src/platform/guimac.mm index 19ef3ca9..d9bef7c2 100644 --- a/src/platform/guimac.mm +++ b/src/platform/guimac.mm @@ -367,6 +367,8 @@ MenuBarRef GetOrCreateMainMenu(bool *unique) { NSTextField *editor; } +@synthesize acceptsFirstResponder; + - (id)initWithFrame:(NSRect)frameRect { if(self = [super initWithFrame:frameRect]) { self.wantsLayer = YES; @@ -1438,7 +1440,7 @@ void OpenInBrowser(const std::string &url) { } - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { - [[[NSApp mainWindow] delegate] windowShouldClose:nil]; + [[[NSApp mainWindow] delegate] windowShouldClose:[NSApp mainWindow]]; return NSTerminateCancel; }