X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/427ff66291af2d8dd34ff5ee68c81436997144a1..c5602b4a8d5c6d0208b21859f9081aa51bea908a:/src/mac/carbon/macnotfy.cpp?ds=sidebyside diff --git a/src/mac/carbon/macnotfy.cpp b/src/mac/carbon/macnotfy.cpp index 36d7fb3e61..2962de20f5 100644 --- a/src/mac/carbon/macnotfy.cpp +++ b/src/mac/carbon/macnotfy.cpp @@ -26,38 +26,10 @@ struct wxMacNotificationEvents } ; typedef struct wxMacNotificationEvents wxMacNotificationEvents ; -wxMacNotificationEvents gMacNotificationEvents ; +static wxMacNotificationEvents gMacNotificationEvents ; ProcessSerialNumber gAppProcess ; -void wxMacWakeUp() -{ - ProcessSerialNumber psn ; - Boolean isSame ; - psn.highLongOfPSN = 0 ; - psn.lowLongOfPSN = kCurrentProcess ; - SameProcess( &gAppProcess , &psn , &isSame ) ; - if ( isSame ) - { -#if TARGET_CARBON - EventRef dummyEvent ; - OSStatus err = MacCreateEvent(nil, 'WXMC', 'WXMC', GetCurrentEventTime(), - kEventAttributeNone, &dummyEvent); - if (err == noErr) - { - err = PostEventToQueue(GetMainEventQueue(), dummyEvent, - kEventPriorityHigh); - } -#else - PostEvent( nullEvent , 0 ) ; -#endif - } - else - { - WakeUpProcess( &gAppProcess ) ; - } -} - void wxMacCreateNotifierTable() { GetCurrentProcess(&gAppProcess); @@ -112,11 +84,11 @@ void wxMacRemoveAllNotifiersForData( wxMacNotifierTableRef table , void* data ) while ( e->top != index ) { - if ( index == kMaxEvents ) - index = 0 ; if ( e->data[index] == data ) e->data[index] = NULL ; index++ ; + if ( index == kMaxEvents ) + index = 0 ; } }