- WindowRef window = MacGetRootWindow() ;
- if ( window )
- {
- wxWindow* win = wxFindWinFromMacWindow( window ) ;
- if ( win )
- {
- wxMacDrawingHelper help( win ) ;
- // the mac control manager always assumes to have the origin at 0,0
- wxDC::MacSetupBackgroundForCurrentPort( MacGetBackgroundBrush() ) ;
- UMADrawControl( m_macControl ) ;
- }
- }
+ wxClientDC dc(this) ;
+ wxMacPortSetter helper(&dc) ;
+
+ // the controls sometimes draw outside their boundaries, this
+ // should be resolved differently but is not trivial (e.g. drop shadows)
+ // since adding them to the border would yield in enormous gaps between
+ // the controls
+ Rect r = { 0 , 0 , 32000 , 32000 } ;
+ ClipRect( &r ) ;
+ wxDC::MacSetupBackgroundForCurrentPort( MacGetBackgroundBrush() ) ;
+ UMADrawControl( (ControlHandle) m_macControl ) ;