scope added for keyboard handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -176,15 +176,17 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event
|
|||||||
{
|
{
|
||||||
case kEventRawKeyRepeat :
|
case kEventRawKeyRepeat :
|
||||||
case kEventRawKeyDown :
|
case kEventRawKeyDown :
|
||||||
WXEVENTREF formerEvent = wxTheApp->MacGetCurrentEvent() ;
|
|
||||||
WXEVENTHANDLERCALLREF formerHandler = wxTheApp->MacGetCurrentEventHandlerCallRef() ;
|
|
||||||
wxTheApp->MacSetCurrentEvent( event , handler ) ;
|
|
||||||
if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent(
|
|
||||||
focus , message , modifiers , when , point.h , point.v ) )
|
|
||||||
{
|
{
|
||||||
result = noErr ;
|
WXEVENTREF formerEvent = wxTheApp->MacGetCurrentEvent() ;
|
||||||
|
WXEVENTHANDLERCALLREF formerHandler = wxTheApp->MacGetCurrentEventHandlerCallRef() ;
|
||||||
|
wxTheApp->MacSetCurrentEvent( event , handler ) ;
|
||||||
|
if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent(
|
||||||
|
focus , message , modifiers , when , point.h , point.v ) )
|
||||||
|
{
|
||||||
|
result = noErr ;
|
||||||
|
}
|
||||||
|
wxTheApp->MacSetCurrentEvent( formerEvent , formerHandler ) ;
|
||||||
}
|
}
|
||||||
wxTheApp->MacSetCurrentEvent( formerEvent , formerHandler ) ;
|
|
||||||
break ;
|
break ;
|
||||||
case kEventRawKeyUp :
|
case kEventRawKeyUp :
|
||||||
if ( (focus != NULL) && wxTheApp->MacSendKeyUpEvent(
|
if ( (focus != NULL) && wxTheApp->MacSendKeyUpEvent(
|
||||||
|
@@ -176,15 +176,17 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event
|
|||||||
{
|
{
|
||||||
case kEventRawKeyRepeat :
|
case kEventRawKeyRepeat :
|
||||||
case kEventRawKeyDown :
|
case kEventRawKeyDown :
|
||||||
WXEVENTREF formerEvent = wxTheApp->MacGetCurrentEvent() ;
|
|
||||||
WXEVENTHANDLERCALLREF formerHandler = wxTheApp->MacGetCurrentEventHandlerCallRef() ;
|
|
||||||
wxTheApp->MacSetCurrentEvent( event , handler ) ;
|
|
||||||
if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent(
|
|
||||||
focus , message , modifiers , when , point.h , point.v ) )
|
|
||||||
{
|
{
|
||||||
result = noErr ;
|
WXEVENTREF formerEvent = wxTheApp->MacGetCurrentEvent() ;
|
||||||
|
WXEVENTHANDLERCALLREF formerHandler = wxTheApp->MacGetCurrentEventHandlerCallRef() ;
|
||||||
|
wxTheApp->MacSetCurrentEvent( event , handler ) ;
|
||||||
|
if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent(
|
||||||
|
focus , message , modifiers , when , point.h , point.v ) )
|
||||||
|
{
|
||||||
|
result = noErr ;
|
||||||
|
}
|
||||||
|
wxTheApp->MacSetCurrentEvent( formerEvent , formerHandler ) ;
|
||||||
}
|
}
|
||||||
wxTheApp->MacSetCurrentEvent( formerEvent , formerHandler ) ;
|
|
||||||
break ;
|
break ;
|
||||||
case kEventRawKeyUp :
|
case kEventRawKeyUp :
|
||||||
if ( (focus != NULL) && wxTheApp->MacSendKeyUpEvent(
|
if ( (focus != NULL) && wxTheApp->MacSendKeyUpEvent(
|
||||||
|
Reference in New Issue
Block a user