diff --git a/src/osx/carbon/evtloop.cpp b/src/osx/carbon/evtloop.cpp index 4a8238baa0..70cda830f4 100644 --- a/src/osx/carbon/evtloop.cpp +++ b/src/osx/carbon/evtloop.cpp @@ -84,12 +84,17 @@ int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout) void wxGUIEventLoop::WakeUp() { + // If there's already one or more events in the queue then there's no need + // to post another one. + if ( GetNumEventsInQueue( GetMainEventQueue() ) > 0 ) + return; + OSStatus err = noErr; wxMacCarbonEvent wakeupEvent; wakeupEvent.Create( 'WXMC', 'WXMC', GetCurrentEventTime(), kEventAttributeNone ); err = PostEventToQueue(GetMainEventQueue(), wakeupEvent, - kEventPriorityHigh ); + kEventPriorityLow ); } void wxGUIEventLoop::OSXDoRun()