]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed missing Idle events
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 29 Mar 2003 15:07:37 +0000 (15:07 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 29 Mar 2003 15:07:37 +0000 (15:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/app.cpp
src/mac/carbon/app.cpp

index 5766c82f22daccd3a56c6dd4e00df429edc28f4d..943e674bf990a17d801d4e1f30668ced9d507387 100644 (file)
@@ -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 ;
index 5766c82f22daccd3a56c6dd4e00df429edc28f4d..943e674bf990a17d801d4e1f30668ced9d507387 100644 (file)
@@ -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 ;