fallback for non implemented structure region call

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2004-04-28 19:24:18 +00:00
parent d59eea2639
commit 736fac3a51

View File

@ -1587,9 +1587,14 @@ wxPoint wxWindowMac::GetClientAreaOrigin() const
GetRegionBounds( rgn , &content ) ;
DisposeRgn( rgn ) ;
#if !TARGET_API_MAC_OSX
Rect structure ;
GetControlBounds( (ControlRef) m_macControl , &structure ) ;
OffsetRect( &content , -structure.left , -structure.top ) ;
// if the content rgn is empty / not supported
// don't attempt to correct the coordinates to wxWindow relative ones
if (!::EmptyRect( &content ) )
{
Rect structure ;
GetControlBounds( (ControlRef) m_macControl , &structure ) ;
OffsetRect( &content , -structure.left , -structure.top ) ;
}
#endif
return wxPoint( content.left + MacGetLeftBorderSize( ) , content.top + MacGetTopBorderSize( ) );