Don't overflow the message queue in wxEventLoop::WakeUp() in wxOSX.
First, don't add any events at all to it unless it's empty. Second, post new events with low priority instead of high one, we really don't care about them getting processed, other, real, events should take priority. Closes #14256. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
20c130a578
commit
26216bccba
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user