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:
Stefan Csomor
2002-07-04 09:42:03 +00:00
parent cd5082468f
commit 89e9272849
2 changed files with 2 additions and 2 deletions

View File

@@ -252,7 +252,7 @@ pascal OSStatus wxMacWindowEventHandler( EventHandlerCallRef handler , EventRef
long keyval = wxMacTranslateKey(keychar, keycode) ;
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
result = noErr ;