[PATCH] 7160951: ActionListener called twice for JMenuItem using ScreenMenuBar

Marco Dinacci marco.dinacci at gmail.com
Wed Sep 5 11:56:05 PDT 2012


Hi Leonid,

> Why do we need  [menuKey isEqualToString:eventKey] check? If Cocoa has called our action callback and the type of the event which triggered that call is NSKeyDown, doesn't it mean we can be sure that a shortcut has been pressed?

no because there's the case when a user select a menu item pressing
space or enter.
In this case the event is of type NSKeyDown but the keyEquivalent is
empty. If this happens the event has to be propagated.

Best,
Marco


More information about the macosx-port-dev mailing list