]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/app.cpp
remove some unneeded includes, clean up gnome force link stuff a bit
[wxWidgets.git] / src / dfb / app.cpp
index fc5357d91f8567f17623b73d06fbdd4de4ea8883..e84aa6ae98be5450a4568ba7b075fa600f36e5f2 100644 (file)
@@ -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
@@ -140,10 +138,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
     wxLog::Suspend();
 
     if ( wxEventLoop::GetActive() )
-    {
-        while (wxEventLoop::GetActive()->Pending())
-            wxEventLoop::GetActive()->Dispatch();
-    }
+        wxEventLoop::GetActive()->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