-
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
- WindowRef window = (WindowRef)MacGetTopLevelWindowRef() ;
-
- // for composited windows this also triggers a redraw of all
- // invalid views in the window
- if( UMAGetSystemVersion() >= 0x1030 )
- HIWindowFlush(window) ;
- else
-#endif
- {
- // the only way to trigger the redrawing on earlier systems is to call
- // ReceiveNextEvent
-
- EventRef currentEvent = (EventRef) wxTheApp->MacGetCurrentEvent() ;
- UInt32 currentEventClass = 0 ;
- UInt32 currentEventKind = 0 ;
- if ( currentEvent != NULL )
- {
- currentEventClass = ::GetEventClass( currentEvent ) ;
- currentEventKind = ::GetEventKind( currentEvent ) ;
- }
- if ( currentEventClass != kEventClassMenu )
- {
- // when tracking a menu, strange redraw errors occur if we flush now, so leave..
-
- EventRef theEvent;
- OSStatus status = noErr ;
- status = ReceiveNextEvent( 0 , NULL , kEventDurationNoWait , false , &theEvent ) ;
- }
- else
- m_peer->SetNeedsDisplay() ;
- }