X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af34705c34c719d9532faedd4c715da94764e76b..59abfcf813ccca7366bfb6d830e1251be5514ac7:/src/mac/carbon/macnotfy.cpp diff --git a/src/mac/carbon/macnotfy.cpp b/src/mac/carbon/macnotfy.cpp index 690f83b214..8d22be40fd 100644 --- a/src/mac/carbon/macnotfy.cpp +++ b/src/mac/carbon/macnotfy.cpp @@ -7,6 +7,8 @@ * ------------------------------------------------------------------------- */ +#include "wx/wxprec.h" + #include "wx/wx.h" #include "wx/mac/private.h" @@ -28,35 +30,7 @@ struct wxMacNotificationEvents typedef struct wxMacNotificationEvents wxMacNotificationEvents ; static wxMacNotificationEvents gMacNotificationEvents ; -static 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 ) ; - } -} +ProcessSerialNumber gAppProcess ; void wxMacCreateNotifierTable() { @@ -66,7 +40,7 @@ void wxMacCreateNotifierTable() for ( int i = 0 ; i < kMaxEvents ; ++i ) { gMacNotificationEvents.proc[i] = NULL ; - gMacNotificationEvents.events[i] = NULL ; + gMacNotificationEvents.events[i] = 0 ; gMacNotificationEvents.data[i] = NULL ; } } @@ -145,7 +119,7 @@ void wxMacProcessNotifierEvents() wxMacNotificationProcPtr handler = gMacNotificationEvents.proc[index] ; gMacNotificationEvents.data[index] = NULL ; - gMacNotificationEvents.events[index] = NULL ; + gMacNotificationEvents.events[index] = 0 ; gMacNotificationEvents.proc[index] = NULL ; if ( handler )