git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27406
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
Rect scrollrect;
RgnHandle updateRgn = NewRgn() ;
Rect scrollrect;
RgnHandle updateRgn = NewRgn() ;
+#if TARGET_API_MAC_OSX
+ // if there is already a pending redraw event, we first must flush that, as we don't have
+ // means to retrieve the dirty region of a HIView
+ if ( HIViewGetNeedsDisplay( (ControlRef) m_macControl ) )
+ Update() ;
+#endif
{
wxClientDC dc(this) ;
wxMacPortSetter helper(&dc) ;
{
wxClientDC dc(this) ;
wxMacPortSetter helper(&dc) ;
}
// ScrollWindowRect( (WindowRef) MacGetTopLevelWindowRef() , &scrollrect , dx , dy , kScrollWindowInvalidate, updateRgn ) ;
#if TARGET_API_MAC_OSX
}
// ScrollWindowRect( (WindowRef) MacGetTopLevelWindowRef() , &scrollrect , dx , dy , kScrollWindowInvalidate, updateRgn ) ;
#if TARGET_API_MAC_OSX
- Rect before,after ;
- GetRegionBounds( updateRgn , &before ) ;
HIViewConvertRegion( updateRgn , (ControlRef) MacGetTopLevelWindow()->GetHandle() , (ControlRef) m_macControl ) ;
HIViewConvertRegion( updateRgn , (ControlRef) MacGetTopLevelWindow()->GetHandle() , (ControlRef) m_macControl ) ;
- GetRegionBounds( updateRgn , &after ) ;
HIViewSetNeedsDisplayInRegion( (ControlRef) m_macControl , updateRgn , true ) ;
#else
// TODO TEST
HIViewSetNeedsDisplayInRegion( (ControlRef) m_macControl , updateRgn , true ) ;
#else
// TODO TEST
void wxWindowMac::Update()
{
#if TARGET_API_MAC_OSX
void wxWindowMac::Update()
{
#if TARGET_API_MAC_OSX
- HIViewSetNeedsDisplay( (ControlRef) m_macControl , true ) ;
WindowRef window = (WindowRef)MacGetTopLevelWindowRef() ;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
// for composited windows this also triggers a redraw of all
WindowRef window = (WindowRef)MacGetTopLevelWindowRef() ;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
// for composited windows this also triggers a redraw of all
OSStatus status = noErr ;
status = ReceiveNextEvent( 0 , NULL , kEventDurationNoWait , false , &theEvent ) ;
}
OSStatus status = noErr ;
status = ReceiveNextEvent( 0 , NULL , kEventDurationNoWait , false , &theEvent ) ;
}
+ else
+ HIViewSetNeedsDisplay( (ControlRef) m_macControl , true ) ;
}
#else
::Draw1Control( (ControlRef) m_macControl ) ;
}
#else
::Draw1Control( (ControlRef) m_macControl ) ;