]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/dcclient.cpp
Layout correction
[wxWidgets.git] / src / dfb / dcclient.cpp
index 1045b6305eca8100159593f950b453308a4792ec..c4bd27fc69a13edb07734bd90bb7603cd71c51e6 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);