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