adding correct handling of uncovering or covering controls via tlw-resizes (in which case the txnBounds would not change)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -346,7 +346,7 @@ private :
|
|||||||
WindowRef m_txnWindow ;
|
WindowRef m_txnWindow ;
|
||||||
// bounds of the control as we last did set the txn frames
|
// bounds of the control as we last did set the txn frames
|
||||||
Rect m_txnControlBounds ;
|
Rect m_txnControlBounds ;
|
||||||
|
Rect m_txnVisBounds ;
|
||||||
#ifdef __WXMAC_OSX__
|
#ifdef __WXMAC_OSX__
|
||||||
static pascal void TXNScrollInfoProc (SInt32 iValue, SInt32 iMaximumValue,
|
static pascal void TXNScrollInfoProc (SInt32 iValue, SInt32 iMaximumValue,
|
||||||
TXNScrollBarOrientation iScrollBarOrientation, SInt32 iRefCon) ;
|
TXNScrollBarOrientation iScrollBarOrientation, SInt32 iRefCon) ;
|
||||||
@@ -2141,14 +2141,18 @@ void wxMacMLTEClassicControl::MacUpdatePosition()
|
|||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
UMAGetControlBoundsInWindowCoords(m_controlRef, &bounds);
|
UMAGetControlBoundsInWindowCoords(m_controlRef, &bounds);
|
||||||
|
|
||||||
if ( !EqualRect( &bounds , &m_txnControlBounds ) )
|
wxRect visRect = textctrl->MacGetClippedClientRect() ;
|
||||||
{
|
|
||||||
// old position
|
|
||||||
Rect oldBounds = m_txnControlBounds ;
|
|
||||||
m_txnControlBounds = bounds ;
|
|
||||||
wxMacWindowClipper cl(textctrl) ;
|
|
||||||
wxRect visRect = textctrl->MacGetClippedRect() ;
|
|
||||||
Rect visBounds = { visRect.y , visRect.x , visRect.y + visRect.height , visRect.x + visRect.width } ;
|
Rect visBounds = { visRect.y , visRect.x , visRect.y + visRect.height , visRect.x + visRect.width } ;
|
||||||
|
int x , y ;
|
||||||
|
x = y = 0 ;
|
||||||
|
textctrl->MacWindowToRootWindow( &x , &y ) ;
|
||||||
|
OffsetRect( &visBounds , x , y ) ;
|
||||||
|
|
||||||
|
if ( !EqualRect( &bounds , &m_txnControlBounds ) || !EqualRect( &visBounds , &m_txnVisBounds) )
|
||||||
|
{
|
||||||
|
m_txnControlBounds = bounds ;
|
||||||
|
m_txnVisBounds = visBounds ;
|
||||||
|
wxMacWindowClipper cl(textctrl) ;
|
||||||
|
|
||||||
#ifdef __WXMAC_OSX__
|
#ifdef __WXMAC_OSX__
|
||||||
bool isCompositing = textctrl->MacGetTopLevelWindow()->MacUsesCompositing() ;
|
bool isCompositing = textctrl->MacGetTopLevelWindow()->MacUsesCompositing() ;
|
||||||
@@ -2188,10 +2192,6 @@ void wxMacMLTEClassicControl::MacUpdatePosition()
|
|||||||
SetControlViewSize( m_sbVertical , h ) ;
|
SetControlViewSize( m_sbVertical , h ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int x , y ;
|
|
||||||
x = y = 0 ;
|
|
||||||
textctrl->MacWindowToRootWindow( &x , &y ) ;
|
|
||||||
OffsetRect( &visBounds , x , y ) ;
|
|
||||||
|
|
||||||
Rect oldviewRect ;
|
Rect oldviewRect ;
|
||||||
TXNLongRect olddestRect ;
|
TXNLongRect olddestRect ;
|
||||||
@@ -2584,6 +2584,7 @@ OSStatus wxMacMLTEClassicControl::DoCreate()
|
|||||||
UMAGetControlBoundsInWindowCoords(m_controlRef, &bounds);
|
UMAGetControlBoundsInWindowCoords(m_controlRef, &bounds);
|
||||||
|
|
||||||
m_txnControlBounds = bounds ;
|
m_txnControlBounds = bounds ;
|
||||||
|
m_txnVisBounds = bounds ;
|
||||||
|
|
||||||
CGrafPtr origPort = NULL ;
|
CGrafPtr origPort = NULL ;
|
||||||
GDHandle origDev = NULL ;
|
GDHandle origDev = NULL ;
|
||||||
|
Reference in New Issue
Block a user