- if (pTB->m_pMenu == NULL)
- return eventNotHandledErr;
-
- //
- // This is the real reason why we need this. Normally menus
- // get handled in wxMacAppEventHandler
- //
- // pascal OSStatus wxMacAppEventHandler(EventHandlerCallRef handler,
- // EventRef event, void *data)
- //
- // However, in the case of a taskbar menu call
- // command.menu.menuRef IS NULL!
- // Which causes the wxApp handler just to skip it.
- //
- MenuRef taskbarMenuRef = MAC_WXHMENU(pTB->m_pMenu->GetHMenu());
- OSErr err;
-
- // get the HICommand from the event
- HICommand command;
- err = GetEventParameter(inEvent, kEventParamDirectObject,
- typeHICommand, NULL,
- sizeof(HICommand), NULL, &command);
- if (err == noErr)