wxEvtHandler * const handler = m_wxPeer->GetEventHandler();
wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
+ command_event.SetEventObject( wxevent.GetEventObject() );
handled = handler->ProcessEvent( command_event );
if ( !handled )
if ( !CanFocus() )
return false;
- [[m_osxView window] makeKeyAndOrderFront:nil] ;
+ // TODO remove if no issues arise: should not raise the window, only assign focus
+ //[[m_osxView window] makeKeyAndOrderFront:nil] ;
[[m_osxView window] makeFirstResponder: m_osxView] ;
return true;
}
// changed by SetupKeyEvent() so it can be wxEVT_KEY_UP too by now).
if ( wxevent.GetEventType() == wxEVT_KEY_DOWN )
{
- wxKeyEvent eventHook(wxevent);
- eventHook.SetEventType(wxEVT_CHAR_HOOK);
- if ( wxGetTopLevelParent(GetWXPeer())->OSXHandleKeyEvent(eventHook) )
+ wxKeyEvent eventHook(wxEVT_CHAR_HOOK, wxevent);
+ if ( GetWXPeer()->OSXHandleKeyEvent(eventHook)
+ && !eventHook.IsNextEventAllowed() )
return true;
}