along the same change in dc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0f7817ab1f
commit
bcbbfab838
@ -72,12 +72,16 @@ wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) :
|
||||
|
||||
if ( win )
|
||||
{
|
||||
int x = 0 , y = 0;
|
||||
win->MacWindowToRootWindow( &x,&y ) ;
|
||||
// get area including focus rect
|
||||
CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion(true).GetWXHRGN() , m_newClip ) ;
|
||||
if ( !EmptyRgn( m_newClip ) )
|
||||
OffsetRgn( m_newClip , x , y ) ;
|
||||
// guard against half constructed objects, this just leads to a empty clip
|
||||
if( win->GetPeer() )
|
||||
{
|
||||
int x = 0 , y = 0;
|
||||
win->MacWindowToRootWindow( &x,&y ) ;
|
||||
// get area including focus rect
|
||||
CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion(true).GetWXHRGN() , m_newClip ) ;
|
||||
if ( !EmptyRgn( m_newClip ) )
|
||||
OffsetRgn( m_newClip , x , y ) ;
|
||||
}
|
||||
|
||||
SetClip( m_newClip ) ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user