1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-30 05:58:52 -05:00

Added Lion full scren menu item.

This commit is contained in:
Camilla Berglund 2013-10-28 13:01:58 +01:00
parent 7d1ae7aea7
commit 58045a5c07

View File

@ -796,6 +796,19 @@ static void createMenuBar(void)
action:@selector(arrangeInFront:) action:@selector(arrangeInFront:)
keyEquivalent:@""]; 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 // Prior to Snow Leopard, we need to use this oddly-named semi-private API
// to get the application menu working properly. // to get the application menu working properly.
SEL setAppleMenuSelector = NSSelectorFromString(@"setAppleMenu:"); SEL setAppleMenuSelector = NSSelectorFromString(@"setAppleMenu:");