changed processing of events to only process the events that were logged when entering wxMacProcessNotifierEvents, ignoring eventually added new ones during notifier processing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -115,7 +115,15 @@ void wxMacProcessNotifierEvents()
|
|||||||
// return ;
|
// return ;
|
||||||
|
|
||||||
gInProcessing = true ;
|
gInProcessing = true ;
|
||||||
while ( gMacNotificationEvents.top != gMacNotificationEvents.bottom )
|
if ( gMacNotificationEvents.top != gMacNotificationEvents.bottom )
|
||||||
|
{
|
||||||
|
// we only should process the notifiers that were here when we entered it
|
||||||
|
// otherwise we might never get out...
|
||||||
|
short count = gMacNotificationEvents.top - gMacNotificationEvents.bottom ;
|
||||||
|
if ( count < 0 )
|
||||||
|
count += kMaxEvents ;
|
||||||
|
|
||||||
|
while ( count-- )
|
||||||
{
|
{
|
||||||
// consume event at bottom
|
// consume event at bottom
|
||||||
short index = gMacNotificationEvents.bottom++ ;
|
short index = gMacNotificationEvents.bottom++ ;
|
||||||
@@ -132,6 +140,7 @@ void wxMacProcessNotifierEvents()
|
|||||||
if ( handler )
|
if ( handler )
|
||||||
handler( event , data ) ;
|
handler( event , data ) ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
gInProcessing = false ;
|
gInProcessing = false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -115,7 +115,15 @@ void wxMacProcessNotifierEvents()
|
|||||||
// return ;
|
// return ;
|
||||||
|
|
||||||
gInProcessing = true ;
|
gInProcessing = true ;
|
||||||
while ( gMacNotificationEvents.top != gMacNotificationEvents.bottom )
|
if ( gMacNotificationEvents.top != gMacNotificationEvents.bottom )
|
||||||
|
{
|
||||||
|
// we only should process the notifiers that were here when we entered it
|
||||||
|
// otherwise we might never get out...
|
||||||
|
short count = gMacNotificationEvents.top - gMacNotificationEvents.bottom ;
|
||||||
|
if ( count < 0 )
|
||||||
|
count += kMaxEvents ;
|
||||||
|
|
||||||
|
while ( count-- )
|
||||||
{
|
{
|
||||||
// consume event at bottom
|
// consume event at bottom
|
||||||
short index = gMacNotificationEvents.bottom++ ;
|
short index = gMacNotificationEvents.bottom++ ;
|
||||||
@@ -132,6 +140,7 @@ void wxMacProcessNotifierEvents()
|
|||||||
if ( handler )
|
if ( handler )
|
||||||
handler( event , data ) ;
|
handler( event , data ) ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
gInProcessing = false ;
|
gInProcessing = false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user