]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/wrapdfb.cpp
Avoid calling gtk_window_get_position() from "configure-event" handler, if possible.
[wxWidgets.git] / src / dfb / wrapdfb.cpp
index e05ad09541b4500b12a8271234b739d97c170a6b..f62e9c367bdacfe8fb10d9865c4046f47f297ae4 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wx wrappers for DirectFB interfaces
 // Author:      Vaclav Slavik
 // Created:     2006-09-04
 // Purpose:     wx wrappers for DirectFB interfaces
 // Author:      Vaclav Slavik
 // Created:     2006-09-04
-// RCS-ID:      $Id$
 // Copyright:   (c) 2006 REA Elektronik GmbH
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 2006 REA Elektronik GmbH
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -36,7 +35,7 @@ bool wxDfbCheckReturn(DFBResult code)
         // these are programming errors, assert:
         #define DFB_ASSERT(code)                                        \
             case code:                                                  \
         // these are programming errors, assert:
         #define DFB_ASSERT(code)                                        \
             case code:                                                  \
-                wxFAIL_MSG( "DirectFB error: " _T(#code) );         \
+                wxFAIL_MSG( "DirectFB error: " wxT(#code) );         \
                 return false                                            \
 
         DFB_ASSERT(DFB_DEAD);
                 return false                                            \
 
         DFB_ASSERT(DFB_DEAD);
@@ -61,7 +60,7 @@ bool wxDfbCheckReturn(DFBResult code)
 
         default:
             // FIXME: should handle the errors individually
 
         default:
             // FIXME: should handle the errors individually
-            wxLogError(_("DirectFB error %d occured."), (int)code);
+            wxLogError(_("DirectFB error %d occurred."), (int)code);
             return false;
     }
 }
             return false;
     }
 }
@@ -105,7 +104,13 @@ wxIDirectFBSurfacePtr wxIDirectFB::GetPrimarySurface()
 {
     DFBSurfaceDescription desc;
     desc.flags = DSDESC_CAPS;
 {
     DFBSurfaceDescription desc;
     desc.flags = DSDESC_CAPS;
-    desc.caps = DSCAPS_PRIMARY;
+    // NB: see dcscreen.cpp for why we request double-buffered surface
+    //
+    //     This assumes the cooperative level is DFSCL_NORMAL (that's the
+    //     default and wx doesn't modify it anywhere); if we ever support
+    //     other cooperative levels, DSCAPS_DOUBLE should *not* be used with
+    //     them.
+    desc.caps = DFBSurfaceCapabilities(DSCAPS_PRIMARY | DSCAPS_DOUBLE);
     return CreateSurface(&desc);
 }
 
     return CreateSurface(&desc);
 }