]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/dcclient.cpp
fixed IMPLEMENT_APP to work even if compiled with --with-themes and win32 or gtk...
[wxWidgets.git] / src / dfb / dcclient.cpp
index 4cac80be25d255fa74192e8754d67b26b1ec64f0..1d1354843e0eaeb3c6194a9264e50beee4467a1f 100644 (file)
@@ -74,7 +74,11 @@ wxIDirectFBSurfacePtr CreateDummySurface(wxWindow *win, const wxRect *rect)
     wxLogTrace(TRACE_PAINT, _T("%p ('%s'): creating dummy DC surface"),
                win, win->GetName().c_str());
     wxSize size(rect ? rect->GetSize() : win->GetSize());
     wxLogTrace(TRACE_PAINT, _T("%p ('%s'): creating dummy DC surface"),
                win, win->GetName().c_str());
     wxSize size(rect ? rect->GetSize() : win->GetSize());
-    return win->GetDfbSurface()->CreateCompatible(size);
+    return win->GetDfbSurface()->CreateCompatible
+           (
+             size,
+             wxIDirectFBSurface::CreateCompatible_NoBackBuffer
+           );
 }
 
 //-----------------------------------------------------------------------------
 }
 
 //-----------------------------------------------------------------------------
@@ -191,8 +195,14 @@ wxWindowDC::~wxWindowDC()
 
     if ( m_shouldFlip )
     {
 
     if ( m_shouldFlip )
     {
-        // FIXME: flip only modified parts of the surface
-        surface->FlipToFront();
+        DFBSurfaceCapabilities caps = DSCAPS_NONE;
+        surface->GetCapabilities(&caps);
+        if ( caps & DSCAPS_DOUBLE )
+        {
+            // FIXME: flip only modified parts of the surface
+            surface->FlipToFront();
+        }
+        // else: the surface is not double-buffered and so cannot be flipped
     }
     // else: don't flip the surface, wxTLW will do it when it finishes
     //       painting of its invalidated areas
     }
     // else: don't flip the surface, wxTLW will do it when it finishes
     //       painting of its invalidated areas