From 3470af1c9a450dbc8206fe00ed8ede3c38c10daa Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 29 Mar 2003 15:07:37 +0000 Subject: [PATCH] fixed missing Idle events git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/app.cpp | 7 +++++-- src/mac/carbon/app.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 5766c82f22..943e674bf9 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -398,13 +398,15 @@ static pascal OSStatus ApplicationEventHandler( EventHandlerCallRef handler , Ev { case kEventAppActivated : { - wxTheApp->MacResume( true ) ; + if ( wxTheApp ) + wxTheApp->MacResume( true ) ; result = noErr ; } break ; case kEventAppDeactivated : { - wxTheApp->MacSuspend( true ) ; + if ( wxTheApp ) + wxTheApp->MacSuspend( true ) ; result = noErr ; } break ; @@ -1482,6 +1484,7 @@ void wxApp::MacDoOneEvent() { MacHandleOneEvent( theEvent ) ; ReleaseEvent(theEvent); + sleepTime = kEventDurationNoWait ; } #else EventRecord event ; diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 5766c82f22..943e674bf9 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -398,13 +398,15 @@ static pascal OSStatus ApplicationEventHandler( EventHandlerCallRef handler , Ev { case kEventAppActivated : { - wxTheApp->MacResume( true ) ; + if ( wxTheApp ) + wxTheApp->MacResume( true ) ; result = noErr ; } break ; case kEventAppDeactivated : { - wxTheApp->MacSuspend( true ) ; + if ( wxTheApp ) + wxTheApp->MacSuspend( true ) ; result = noErr ; } break ; @@ -1482,6 +1484,7 @@ void wxApp::MacDoOneEvent() { MacHandleOneEvent( theEvent ) ; ReleaseEvent(theEvent); + sleepTime = kEventDurationNoWait ; } #else EventRecord event ; -- 2.49.0