X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/86deae1ef1ce9fdef44ed0bdacedbd8966d863f4..590e21b0e29d2406625227419e39b671b581a6a5:/src/mac/carbon/window.cpp?ds=sidebyside diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index bfff87c13d..8fad9699bc 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -1278,7 +1278,16 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) child->GetPosition( &x, &y ); int w,h; child->GetSize( &w, &h ); - child->SetSize( x+dx, y+dy, w, h ); + if (rect) + { + wxRect rc(x,y,w,h); + if (rect->Intersects(rc)) + child->SetSize( x+dx, y+dy, w, h ); + } + else + { + child->SetSize( x+dx, y+dy, w, h ); + } } Update() ;