From: Stefan Csomor Date: Wed, 31 Mar 2004 13:23:56 +0000 (+0000) Subject: refresh on move changed X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b05bf6eec7c04807d310e1d03aea37b020cca81e refresh on move changed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 69bba8fcbe..e8ad6afc61 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -1359,13 +1359,25 @@ void wxWindowMac::DoMoveWindow(int x, int y, int width, int height) if ( doMove || doResize ) { Rect r = wxMacGetBoundsForControl(this , wxPoint( actualX,actualY), wxSize( actualWidth, actualHeight ) ) ; + bool vis = IsControlVisible( (ControlRef) m_macControl ) ; #if TARGET_API_MAC_OSX - SetControlBounds( (ControlRef) m_macControl , &r ) ; + // the HIViewSetFrame call itself should invalidate the areas, but when testing with the UnicodeTextCtrl it does not ! + if ( vis ) + SetControlVisibility( (ControlRef)m_macControl , false , true ) ; + HIRect hir = { r.left , r.top , r.right - r.left , r.bottom - r.top } ; + HIViewSetFrame ( (ControlRef) m_macControl , &hir ) ; + if ( vis ) + SetControlVisibility( (ControlRef)m_macControl , true , true ) ; #else +// TODO TEST SetControlBounds( (ControlRef) m_macControl , &r ) ; + if ( vis ) + SetControlVisibility( (ControlRef)m_macControl , false , true ) ; if ( doMove ) MoveControl( (ControlRef) m_macControl , r.left , r.top ) ; if ( doSize ) SizeControl( (ControlRef) m_macControl , r.right-r.left , r.bottom-r.top ) ; + if ( vis ) + SetControlVisibility( (ControlRef)m_macControl , true , true ) ; #endif MacRepositionScrollBars() ; if ( doMove )