mirror of https://github.com/mpv-player/mpv
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:
parent
c083a7f53e
commit
265547eb94
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue