because some sash code draws whether the window is visible or not, the easiest thing is to make the MacGetVisibleRegion return an empty region for this case, so the wxDC is always entirely clipped
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1638,6 +1638,8 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
||||
RgnHandle tempRgn = NewRgn() ;
|
||||
RgnHandle tempStaticBoxRgn = NewRgn() ;
|
||||
|
||||
if ( MacIsReallyShown() )
|
||||
{
|
||||
SetRectRgn( visRgn , 0 , 0 , m_width , m_height ) ;
|
||||
|
||||
//TODO : as soon as the new scheme has proven to work correctly, move this to wxStaticBox
|
||||
@@ -1645,6 +1647,8 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
||||
{
|
||||
int borderTop = 14 ;
|
||||
int borderOther = 4 ;
|
||||
if ( UMAGetSystemVersion() >= 0x1030 )
|
||||
borderTop += 2 ;
|
||||
|
||||
SetRectRgn( tempStaticBoxRgn , borderOther , borderTop , m_width - borderOther , m_height - borderOther ) ;
|
||||
DiffRgn( visRgn , tempStaticBoxRgn , visRgn ) ;
|
||||
@@ -1687,6 +1691,8 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
||||
{
|
||||
int borderTop = 14 ;
|
||||
int borderOther = 4 ;
|
||||
if ( UMAGetSystemVersion() >= 0x1030 )
|
||||
borderTop += 2 ;
|
||||
|
||||
SetRectRgn( tempStaticBoxRgn , child->m_x + borderOther , child->m_y + borderTop , child->m_x + child->m_width - borderOther , child->m_y + child->m_height - borderOther ) ;
|
||||
DiffRgn( tempRgn , tempStaticBoxRgn , tempRgn ) ;
|
||||
@@ -1719,6 +1725,8 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
||||
{
|
||||
int borderTop = 14 ;
|
||||
int borderOther = 4 ;
|
||||
if ( UMAGetSystemVersion() >= 0x1030 )
|
||||
borderTop += 2 ;
|
||||
|
||||
SetRectRgn( tempStaticBoxRgn , sibling->m_x - m_x + borderOther , sibling->m_y - m_y + borderTop , sibling->m_x + sibling->m_width - m_x - borderOther , sibling->m_y + sibling->m_height - m_y - borderOther ) ;
|
||||
DiffRgn( tempRgn , tempStaticBoxRgn , tempRgn ) ;
|
||||
@@ -1728,6 +1736,7 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
m_macVisibleRegion = visRgn ;
|
||||
DisposeRgn( visRgn ) ;
|
||||
DisposeRgn( tempRgn ) ;
|
||||
|
@@ -1638,6 +1638,8 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
||||
RgnHandle tempRgn = NewRgn() ;
|
||||
RgnHandle tempStaticBoxRgn = NewRgn() ;
|
||||
|
||||
if ( MacIsReallyShown() )
|
||||
{
|
||||
SetRectRgn( visRgn , 0 , 0 , m_width , m_height ) ;
|
||||
|
||||
//TODO : as soon as the new scheme has proven to work correctly, move this to wxStaticBox
|
||||
@@ -1645,6 +1647,8 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
||||
{
|
||||
int borderTop = 14 ;
|
||||
int borderOther = 4 ;
|
||||
if ( UMAGetSystemVersion() >= 0x1030 )
|
||||
borderTop += 2 ;
|
||||
|
||||
SetRectRgn( tempStaticBoxRgn , borderOther , borderTop , m_width - borderOther , m_height - borderOther ) ;
|
||||
DiffRgn( visRgn , tempStaticBoxRgn , visRgn ) ;
|
||||
@@ -1687,6 +1691,8 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
||||
{
|
||||
int borderTop = 14 ;
|
||||
int borderOther = 4 ;
|
||||
if ( UMAGetSystemVersion() >= 0x1030 )
|
||||
borderTop += 2 ;
|
||||
|
||||
SetRectRgn( tempStaticBoxRgn , child->m_x + borderOther , child->m_y + borderTop , child->m_x + child->m_width - borderOther , child->m_y + child->m_height - borderOther ) ;
|
||||
DiffRgn( tempRgn , tempStaticBoxRgn , tempRgn ) ;
|
||||
@@ -1719,6 +1725,8 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
||||
{
|
||||
int borderTop = 14 ;
|
||||
int borderOther = 4 ;
|
||||
if ( UMAGetSystemVersion() >= 0x1030 )
|
||||
borderTop += 2 ;
|
||||
|
||||
SetRectRgn( tempStaticBoxRgn , sibling->m_x - m_x + borderOther , sibling->m_y - m_y + borderTop , sibling->m_x + sibling->m_width - m_x - borderOther , sibling->m_y + sibling->m_height - m_y - borderOther ) ;
|
||||
DiffRgn( tempRgn , tempStaticBoxRgn , tempRgn ) ;
|
||||
@@ -1728,6 +1736,7 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
m_macVisibleRegion = visRgn ;
|
||||
DisposeRgn( visRgn ) ;
|
||||
DisposeRgn( tempRgn ) ;
|
||||
|
Reference in New Issue
Block a user