mirror of
https://github.com/ctm/executor.git
synced 2025-02-17 05:31:27 +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];
|
| NSApplicationPresentationAutoHideDock];
|
||||||
dock = true;
|
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;
|
inited = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user