- if ( handler )
- handler( event , data ) ;
- }
- }
- gInProcessing = false ;
+ while ( count-- )
+ {
+ // consume event at bottom
+ short index = gMacNotificationEvents.bottom++ ;
+ if ( gMacNotificationEvents.bottom == kMaxEvents )
+ gMacNotificationEvents.bottom = 0 ;
+ void* data = gMacNotificationEvents.data[index] ;
+ unsigned long event = gMacNotificationEvents.events[index] ;
+ wxMacNotificationProcPtr handler = gMacNotificationEvents.proc[index] ;
+
+ gMacNotificationEvents.data[index] = NULL ;
+ gMacNotificationEvents.events[index] = 0 ;
+ gMacNotificationEvents.proc[index] = NULL ;
+
+ if ( handler )
+ handler( event , data ) ;
+ }
+ }
+ gInProcessing = false ;