diff options
author | Akemi <der.richter@gmx.de> | 2017-03-27 01:29:45 +0200 |
---|---|---|
committer | Akemi <der.richter@gmx.de> | 2017-03-27 01:29:45 +0200 |
commit | 265547eb941bcf48d2c8c9f9e8fbadcec1514a98 (patch) | |
tree | 95aaf32bd202cdf0c18e118bb6bce2da81a5d020 /osdep/macosx_events.m | |
parent | c083a7f53e21ee1d7c1260401de92b30f674e79b (diff) | |
download | mpv-265547eb941bcf48d2c8c9f9e8fbadcec1514a98.tar.bz2 mpv-265547eb941bcf48d2c8c9f9e8fbadcec1514a98.tar.xz |
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.
Diffstat (limited to 'osdep/macosx_events.m')
-rw-r--r-- | osdep/macosx_events.m | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m index 6cddd40026..fc7118de4c 100644 --- a/osdep/macosx_events.m +++ b/osdep/macosx_events.m @@ -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; |