]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/app.cpp
Must call DoMoveWindow in Create() or buttons may not be
[wxWidgets.git] / src / mac / carbon / app.cpp
index 04f3eee3b5bdde44b4d312b43e340a6b35eede28..fd5c1b0d4f27084b82632c002cd13d8efb791a49 100644 (file)
@@ -322,12 +322,12 @@ MenuEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
                           &menuRef);
 #endif // 0
 
                           &menuRef);
 #endif // 0
 
-        wxMenuEvent event(GetEventKind(event) == kEventMenuOpening
+        wxMenuEvent wxevent(GetEventKind(event) == kEventMenuOpening
                         ? wxEVT_MENU_OPEN
                         : wxEVT_MENU_CLOSE);
                         ? wxEVT_MENU_OPEN
                         : wxEVT_MENU_CLOSE);
-        event.SetEventObject(win);
+        wxevent.SetEventObject(win);
 
 
-        (void)win->GetEventHandler()->ProcessEvent(event);
+        (void)win->GetEventHandler()->ProcessEvent(wxevent);
     }
 
     return eventNotHandledErr;
     }
 
     return eventNotHandledErr;
@@ -970,12 +970,6 @@ pascal OSStatus wxMacApplicationEventHandler( EventHandlerCallRef handler , Even
 
 wxApp::wxApp()
 {
 
 wxApp::wxApp()
 {
-  m_topWindow = NULL;
-  wxTheApp = this;
-
-  argc = 0;
-  argv = NULL;
-
   m_printMode = wxPRINT_WINDOWS;
   m_auto3D = TRUE;
 }
   m_printMode = wxPRINT_WINDOWS;
   m_auto3D = TRUE;
 }
@@ -1025,33 +1019,13 @@ void wxApp::Dispatch()
 
 void wxApp::OnIdle(wxIdleEvent& event)
 {
 
 void wxApp::OnIdle(wxIdleEvent& event)
 {
-    // Avoid recursion (via ProcessEvent default case)
-    if ( s_inOnIdle )
-        return;
-
-
-  s_inOnIdle = TRUE;
-
-  // 'Garbage' collection of windows deleted with Close().
-  DeletePendingObjects();
-
-  // flush the logged messages if any
-  wxLog *pLog = wxLog::GetActiveTarget();
-  if ( pLog != NULL && pLog->HasPendingMessages() )
-    pLog->Flush();
-
-  // Send OnIdle events to all windows
-  bool needMore = SendIdleEvents();
-
-  if (needMore)
-    event.RequestMore(TRUE);
-
+    wxAppBase::OnIdle(event);
+    
     // If they are pending events, we must process them: pending events are
     // either events to the threads other than main or events posted with
     // wxPostEvent() functions
     wxMacProcessNotifierAndPendingEvents();
 
     // If they are pending events, we must process them: pending events are
     // either events to the threads other than main or events posted with
     // wxPostEvent() functions
     wxMacProcessNotifierAndPendingEvents();
 
-  s_inOnIdle = FALSE;
   if(!wxMenuBar::MacGetInstalledMenuBar() && wxMenuBar::MacGetCommonMenuBar())
     wxMenuBar::MacGetCommonMenuBar()->MacInstallMenuBar();
 }
   if(!wxMenuBar::MacGetInstalledMenuBar() && wxMenuBar::MacGetCommonMenuBar())
     wxMenuBar::MacGetCommonMenuBar()->MacInstallMenuBar();
 }