From 58045a5c0792ea9805045273aae4e3d76266ee81 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 28 Oct 2013 13:01:58 +0100 Subject: [PATCH] Added Lion full scren menu item. --- src/cocoa_window.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 21dbe5e7..5010a19a 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -796,6 +796,19 @@ static void createMenuBar(void) action:@selector(arrangeInFront:) keyEquivalent:@""]; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 + if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) + { + // TODO: Make this appear at the bottom of the menu (for consistency) + + [windowMenu addItem:[NSMenuItem separatorItem]]; + [[windowMenu addItemWithTitle:@"Enter Full Screen" + action:@selector(toggleFullScreen:) + keyEquivalent:@"f"] + setKeyEquivalentModifierMask:NSControlKeyMask | NSCommandKeyMask]; + } +#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ + // Prior to Snow Leopard, we need to use this oddly-named semi-private API // to get the application menu working properly. SEL setAppleMenuSelector = NSSelectorFromString(@"setAppleMenu:");