feeds missed key events back to the control

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-06-03 20:32:59 +00:00
parent 0154fd2c88
commit ace07c80ba
2 changed files with 30 additions and 0 deletions

View File

@@ -128,11 +128,26 @@ static pascal OSStatus TextInputEventHandler( EventHandlerCallRef handler , Even
switch ( GetEventKind( event ) )
{
case kEventTextInputUnicodeForKeyEvent :
// this is only called when no default handler has jumped in, eg a wxControl on a floater window does not
// get its own kEventTextInputUnicodeForKeyEvent, so we route back the
wxControl* control = wxDynamicCast( focus , wxControl ) ;
if ( control )
{
ControlHandle macControl = (ControlHandle) control->GetMacControl() ;
if ( macControl )
{
::HandleControlKey( macControl , keyCode , charCode , modifiers ) ;
result = noErr ;
}
}
/*
// this may lead to double events sent to a window in case all handlers have skipped the key down event
if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent(
focus , message , modifiers , when , point.h , point.v ) )
{
result = noErr ;
}
*/
break ;
}