diff --git a/platform/macos/app/AppDelegate.m b/platform/macos/app/AppDelegate.m index d3fe2d204..85b44da1c 100644 --- a/platform/macos/app/AppDelegate.m +++ b/platform/macos/app/AppDelegate.m @@ -71,7 +71,7 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask"; @end -@interface AppDelegate () +@interface AppDelegate () @property (weak) IBOutlet NSArrayController *offlinePacksArrayController; @property (weak) IBOutlet NSPanel *offlinePacksPanel; @@ -283,4 +283,13 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask"; return NO; } +#pragma mark NSWindowDelegate methods + +- (void)windowWillClose:(NSNotification *)notification { + NSWindow *window = notification.object; + if (window == self.preferencesWindow) { + [window makeFirstResponder:nil]; + } +} + @end diff --git a/platform/macos/app/Base.lproj/MainMenu.xib b/platform/macos/app/Base.lproj/MainMenu.xib index 9faf1ba04..d416ea9f2 100644 --- a/platform/macos/app/Base.lproj/MainMenu.xib +++ b/platform/macos/app/Base.lproj/MainMenu.xib @@ -1,7 +1,8 @@ - + - + + @@ -703,6 +704,7 @@ CA +