osx: fix event propagation of menu bar item key shortcuts

a small logic error in 063ca8f broke the filtering of the menu bar item
key shortcuts. they where called several times per event because the
propagation wasn't stopped properly.
This commit is contained in:
Akemi 2017-03-27 01:29:45 +02:00
parent c083a7f53e
commit 265547eb94
1 changed files with 3 additions and 4 deletions

View File

@ -510,10 +510,9 @@ void cocoa_set_mpv_handle(struct mpv_handle *ctx)
- (bool)processKeyEvent:(NSEvent *)event
{
if ((event.type == NSEventTypeKeyDown || event.type == NSEventTypeKeyUp) &&
![[NSApp mainMenu] performKeyEquivalent:event])
{
[self handleKey:event];
if (event.type == NSEventTypeKeyDown || event.type == NSEventTypeKeyUp){
if (![[NSApp mainMenu] performKeyEquivalent:event])
[self handleKey:event];
return true;
}
return false;