only fowarding events if there is a focus window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -252,7 +252,7 @@ pascal OSStatus wxMacWindowEventHandler( EventHandlerCallRef handler , EventRef
|
|||||||
long keyval = wxMacTranslateKey(keychar, keycode) ;
|
long keyval = wxMacTranslateKey(keychar, keycode) ;
|
||||||
wxWindow* focus = wxWindow::FindFocus() ;
|
wxWindow* focus = wxWindow::FindFocus() ;
|
||||||
|
|
||||||
if ( wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) )
|
if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) )
|
||||||
{
|
{
|
||||||
// was handled internally
|
// was handled internally
|
||||||
result = noErr ;
|
result = noErr ;
|
||||||
|
@@ -252,7 +252,7 @@ pascal OSStatus wxMacWindowEventHandler( EventHandlerCallRef handler , EventRef
|
|||||||
long keyval = wxMacTranslateKey(keychar, keycode) ;
|
long keyval = wxMacTranslateKey(keychar, keycode) ;
|
||||||
wxWindow* focus = wxWindow::FindFocus() ;
|
wxWindow* focus = wxWindow::FindFocus() ;
|
||||||
|
|
||||||
if ( wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) )
|
if ( (focus != NULL) && wxTheApp->MacSendKeyDownEvent( focus , keyval , rec.modifiers , rec.when , rec.where.h , rec.where.v ) )
|
||||||
{
|
{
|
||||||
// was handled internally
|
// was handled internally
|
||||||
result = noErr ;
|
result = noErr ;
|
||||||
|
Reference in New Issue
Block a user