rewire char events in case there is no focusable control on a tlw
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
80b6bf7c7c
commit
ffc75ee452
@ -86,12 +86,14 @@ extern long wxMacTranslateKey(unsigned char key, unsigned char code) ;
|
|||||||
static const EventTypeSpec eventList[] =
|
static const EventTypeSpec eventList[] =
|
||||||
{
|
{
|
||||||
// TODO: remove control related event like key and mouse (except for WindowLeave events)
|
// TODO: remove control related event like key and mouse (except for WindowLeave events)
|
||||||
#if 1
|
|
||||||
{ kEventClassKeyboard, kEventRawKeyDown } ,
|
{ kEventClassKeyboard, kEventRawKeyDown } ,
|
||||||
{ kEventClassKeyboard, kEventRawKeyRepeat } ,
|
{ kEventClassKeyboard, kEventRawKeyRepeat } ,
|
||||||
{ kEventClassKeyboard, kEventRawKeyUp } ,
|
{ kEventClassKeyboard, kEventRawKeyUp } ,
|
||||||
{ kEventClassKeyboard, kEventRawKeyModifiersChanged } ,
|
{ kEventClassKeyboard, kEventRawKeyModifiersChanged } ,
|
||||||
#endif
|
|
||||||
|
{ kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } ,
|
||||||
|
{ kEventClassTextInput, kEventTextInputUpdateActiveInputArea } ,
|
||||||
|
|
||||||
{ kEventClassWindow , kEventWindowShown } ,
|
{ kEventClassWindow , kEventWindowShown } ,
|
||||||
{ kEventClassWindow , kEventWindowActivated } ,
|
{ kEventClassWindow , kEventWindowActivated } ,
|
||||||
@ -795,12 +797,19 @@ static pascal OSStatus wxMacTopLevelWindowEventHandler( EventHandlerCallRef hand
|
|||||||
return result ;
|
return result ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mix this in from window.cpp
|
||||||
|
pascal OSStatus wxMacUnicodeTextEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) ;
|
||||||
|
|
||||||
pascal OSStatus wxMacTopLevelEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
|
pascal OSStatus wxMacTopLevelEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
|
||||||
{
|
{
|
||||||
OSStatus result = eventNotHandledErr ;
|
OSStatus result = eventNotHandledErr ;
|
||||||
|
|
||||||
switch ( GetEventClass( event ) )
|
switch ( GetEventClass( event ) )
|
||||||
{
|
{
|
||||||
|
case kEventClassTextInput :
|
||||||
|
result = wxMacUnicodeTextEventHandler( handler, event , data ) ;
|
||||||
|
break ;
|
||||||
|
|
||||||
case kEventClassKeyboard :
|
case kEventClassKeyboard :
|
||||||
result = KeyboardEventHandler( handler, event , data ) ;
|
result = KeyboardEventHandler( handler, event , data ) ;
|
||||||
break ;
|
break ;
|
||||||
|
Loading…
Reference in New Issue
Block a user