X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e48a3055145e5d3f77b17383ed7521585ea7391d..cb5ec61f651e62d7028abb8d60a11efa786a7466:/src/dfb/app.cpp diff --git a/src/dfb/app.cpp b/src/dfb/app.cpp index fc5357d91f..2cac31028b 100644 --- a/src/dfb/app.cpp +++ b/src/dfb/app.cpp @@ -20,6 +20,7 @@ #include "wx/evtloop.h" #include "wx/dfb/private.h" +#include "wx/private/fontmgr.h" //----------------------------------------------------------------------------- // wxApp initialization @@ -57,6 +58,8 @@ void wxApp::CleanUp() { wxAppBase::CleanUp(); + wxFontsManager::CleanUp(); + wxEventLoop::CleanUp(); wxIDirectFB::CleanUp(); } @@ -67,16 +70,11 @@ void wxApp::CleanUp() static wxVideoMode GetCurrentVideoMode() { - wxVideoMode m; - - wxIDirectFBSurfacePtr surface(wxIDirectFB::Get()->GetPrimarySurface()); - if ( !surface ) - return m; // invalid - - surface->GetSize(&m.w, &m.h); - m.bpp = surface->GetDepth(); + wxIDirectFBDisplayLayerPtr layer(wxIDirectFB::Get()->GetDisplayLayer()); + if ( !layer ) + return wxVideoMode(); // invalid - return m; + return layer->GetVideoMode(); } wxVideoMode wxApp::GetDisplayMode() const @@ -107,7 +105,9 @@ void wxApp::WakeUpIdle() wxMutexGuiEnter(); #endif - wxEventLoop::GetActive()->WakeUp(); + wxEventLoop * const loop = wxEventLoop::GetActive(); + if ( loop ) + loop->WakeUp(); #if wxUSE_THREADS if (!wxThread::IsMain()) @@ -139,11 +139,9 @@ bool wxApp::Yield(bool onlyIfNeeded) wxLog::Suspend(); - if ( wxEventLoop::GetActive() ) - { - while (wxEventLoop::GetActive()->Pending()) - wxEventLoop::GetActive()->Dispatch(); - } + wxEventLoop * const loop = wxEventLoop::GetActive(); + if ( loop ) + loop->Yield(); // it's necessary to call ProcessIdle() to update the frames sizes which // might have been changed (it also will update other things set from