X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b95d7ac96cdf8c9c3c81d48d2d034ea7b8ceb280..2c2fafe9c88ea0ff93b2e1eb7267ceb74bb8958a:/src/cocoa/app.mm diff --git a/src/cocoa/app.mm b/src/cocoa/app.mm index d71f815fc3..662859f091 100644 --- a/src/cocoa/app.mm +++ b/src/cocoa/app.mm @@ -15,7 +15,6 @@ #include "wx/app.h" #ifndef WX_PRECOMP - #include "wx/dc.h" #include "wx/intl.h" #include "wx/log.h" #include "wx/module.h" @@ -26,6 +25,8 @@ #include "wx/cocoa/mbarman.h" #include "wx/cocoa/NSApplication.h" +#include "wx/cocoa/dc.h" + #import #import #import @@ -162,7 +163,7 @@ void wxApp::CleanUp() { wxAutoNSAutoreleasePool pool; - wxDC::CocoaShutdownTextSystem(); + wxCocoaDCImpl::CocoaShutdownTextSystem(); wxMenuBarManager::DestroyInstance(); [[NSNotificationCenter defaultCenter] removeObserver:sg_cocoaAppObserver]; @@ -257,7 +258,7 @@ bool wxApp::OnInitGui() if(!sm_isEmbedded) wxMenuBarManager::CreateInstance(); - wxDC::CocoaInitializeTextSystem(); + wxCocoaDCImpl::CocoaInitializeTextSystem(); return true; } @@ -296,16 +297,13 @@ void wxApp::Exit() // Yield to other processes bool wxApp::Yield(bool onlyIfNeeded) { - // MT-FIXME - static bool s_inYield = false; - #if wxUSE_LOG // disable log flushing from here because a call to wxYield() shouldn't // normally result in message boxes popping up &c wxLog::Suspend(); #endif // wxUSE_LOG - if (s_inYield) + if (m_isInsideYield) { if ( !onlyIfNeeded ) { @@ -315,7 +313,7 @@ bool wxApp::Yield(bool onlyIfNeeded) return false; } - s_inYield = true; + m_isInsideYield = true; // Run the event loop until it is out of events while(1) @@ -357,7 +355,7 @@ bool wxApp::Yield(bool onlyIfNeeded) wxLog::Resume(); #endif // wxUSE_LOG - s_inYield = false; + m_isInsideYield = false; return true; }