]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/dcclient.cpp
don't define wxEventLoop class differently in GUI and base, this breaks the
[wxWidgets.git] / src / dfb / dcclient.cpp
index 1045b6305eca8100159593f950b453308a4792ec..a10dd02b9e0f046873f017f3f825c9220d86f88d 100644 (file)
@@ -27,6 +27,7 @@
 
 #ifndef WX_PRECOMP
     #include "wx/window.h"
+    #include "wx/nonownedwnd.h"
 #endif
 
 #include "wx/dfb/private.h"
@@ -58,6 +59,11 @@ static wxRect GetUncoveredWindowArea(wxWindow *win)
     // coordinates; this will remove parts of 'r' that are outside of the
     // parent's area:
     wxRect rp(GetUncoveredWindowArea(parent));
+
+    // normal windows cannot extend out of its parent's client area:
+    if ( !win->CanBeOutsideClientArea() )
+        rp.Intersect(parent->GetClientRect());
+
     rp.Offset(-win->GetPosition());
     rp.Offset(-parent->GetClientAreaOrigin());
     r.Intersect(rp);
@@ -74,6 +80,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());
+
+    // we can't create a surface of 0 size but the size of the window may be 0,
+    // so ensure that we have at least a single pixel to draw on
+    size.IncTo(wxSize(1, 1));
+
     return win->GetDfbSurface()->CreateCompatible
            (
              size,