This happens (at least) in OS X 10.11.4
To reproduce:
- Launch the Demo.
- Tabs & Widgets → Menus → Look-and-feel → Use Native Menu Bar
- Observe the native menu bar and press e.g. Command - I
→ The menu item ‘Look-and-feel’ flickers (2 times) instead of just flashing up once.
I don’t understand the code involved, but one flicker is triggered at
static void JuceMenuCallbackClass::menuItemInvoked (id self, SEL, NSMenuItem* item)
which calls
bool NSViewComponentPeer::handleKeyEvent (NSEvent* ev, bool isKeyDown)
{
…
used = handleKeyUpOrDown (true) || used;
used = handleKeyPress (keyCode, textCharacter) || used;
…
}
Outcomment the second line and the menu item will only flash up once (but it will not work anymore). Maybe this helps in tracking the issue down.
