X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30c841c84dce46690499567141b98ffcf5a61b6a..655c20fcd5a554a986b93651d8b0bec2afde8573:/src/dfb/dcclient.cpp diff --git a/src/dfb/dcclient.cpp b/src/dfb/dcclient.cpp index 149067554f..c4bd27fc69 100644 --- a/src/dfb/dcclient.cpp +++ b/src/dfb/dcclient.cpp @@ -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); @@ -179,7 +185,7 @@ void wxWindowDC::InitForWin(wxWindow *win, const wxRect *rect) r.x, r.y, r.GetRight(), r.GetBottom(), origin.x, origin.y); - Init(surface); + DFBInit(surface); SetFont(win->GetFont()); // offset coordinates to account for subsurface's origin coordinates: