mirror of
https://github.com/ctm/executor.git
synced 2024-11-23 20:32:28 +00:00
mac-specific hack to disable standard command-Q and command-H shortcuts
This commit is contained in:
parent
16326934bf
commit
8f683c9613
@ -29,5 +29,18 @@ void macosx_hide_menu_bar(int mouseY)
|
||||
| NSApplicationPresentationAutoHideDock];
|
||||
dock = true;
|
||||
}
|
||||
|
||||
if(!inited)
|
||||
{
|
||||
// Zap keyboard equivalents in the application menu.
|
||||
// Emulated mac apps are used to owning Command-H,
|
||||
// and they really need to handle Command-Q.
|
||||
NSMenuItem *menutitle = [[NSApp mainMenu] itemAtIndex: 0];
|
||||
NSMenu *menu = [menutitle submenu];
|
||||
for(NSMenuItem *item in [menu itemArray])
|
||||
{
|
||||
item.keyEquivalent = @"";
|
||||
}
|
||||
}
|
||||
inited = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user