diff --git a/include/wx/evtloop.h b/include/wx/evtloop.h index d83f5d23f6..8dd5d6eb7b 100644 --- a/include/wx/evtloop.h +++ b/include/wx/evtloop.h @@ -203,9 +203,9 @@ protected: bool m_isInsideYield; long m_eventsToProcessInsideYield; +private: // this flag is set on entry into Run() and reset before leaving it bool m_isInsideRun; -private: wxDECLARE_NO_COPY_CLASS(wxEventLoopBase); }; diff --git a/include/wx/osx/cocoa/evtloop.h b/include/wx/osx/cocoa/evtloop.h index 7ae6981b29..ab15dd94af 100644 --- a/include/wx/osx/cocoa/evtloop.h +++ b/include/wx/osx/cocoa/evtloop.h @@ -16,8 +16,6 @@ public: wxGUIEventLoop(); ~wxGUIEventLoop(); - int Run(); - void BeginModalSession( wxWindow* modalWindow ); void EndModalSession(); @@ -27,8 +25,6 @@ public: void OSXUseLowLevelWakeup(bool useIt) { m_osxLowLevelWakeUp = useIt ; } - void OSXOnWillTerminate(); - protected: virtual int DoDispatchTimeout(unsigned long timeout); diff --git a/src/osx/cocoa/evtloop.mm b/src/osx/cocoa/evtloop.mm index 089695d1d8..922d0468f9 100644 --- a/src/osx/cocoa/evtloop.mm +++ b/src/osx/cocoa/evtloop.mm @@ -242,26 +242,6 @@ int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout) static int gs_loopNestingLevel = 0; -int wxGUIEventLoop::Run() -{ - // because we are using native callbacks for notifying about entering and exiting - // the main event loop, we must this leave out here - - // event loops are not recursive, you need to create another loop! - wxCHECK_MSG( !IsInsideRun(), -1, wxT("can't reenter a message loop") ); - - // We might be called again, after a previous call to ScheduleExit(), so - // reset this flag. - m_shouldExit = false; - - // Set this variable to true for the duration of this method. - m_isInsideRun = true; - wxON_BLOCK_EXIT_SET(m_isInsideRun, false); - - // Finally really run the loop. - return DoRun(); -} - void wxGUIEventLoop::OSXDoRun() { /* @@ -371,11 +351,6 @@ void wxGUIEventLoop::OSXDoStop() WakeUp(); } -void wxGUIEventLoop::OSXOnWillTerminate() -{ - OnExit(); -} - void wxGUIEventLoop::WakeUp() { // NSEvent* cevent = [NSApp currentEvent];