macOS: fix crash on startup.

Added missing @synthesize acceptsFirstResponder;
Replaced generic ApplicationDelegate in MainMenu.xib
pull/348/head
Alexander Meißner 2018-07-31 17:55:11 +02:00 committed by whitequark
parent c3875cba9e
commit bc6a923c4c
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,7 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication"/>
<customObject id="-3" userLabel="Application"/>
<customObject id="-4" userLabel="Application Delegate" customClass="ApplicationDelegate"/>
<customObject id="-4" userLabel="Application Delegate" customClass="SSApplicationDelegate"/>
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items>

View File

@ -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;
}