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:
parent
d59eea2639
commit
736fac3a51
@ -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( ) );
|
||||
|
Loading…
Reference in New Issue
Block a user