Don't dispatch pending events from selective YieldFor().
Pending events list can contain events from all kinds and dispatching them from YieldFor() called to dispatch the events of some particular kind only (e.g. to redraw the window) is unexpected and wrong, e.g. it breaks some uses of wxProgressDialog, see #15799. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -395,7 +395,12 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
|
||||
|
||||
// Process all pending events too, this is consistent with wxMSW behaviour
|
||||
// and the behaviour of wxGTK itself in the previous versions.
|
||||
if ( wxTheApp )
|
||||
//
|
||||
// Notice however that we must not do it if we're asked to process only the
|
||||
// events of specific kind, as pending events could be of any kind at all
|
||||
// (ideal would be to have a filtering version of ProcessPendingEvents()
|
||||
// too but we don't have this right now).
|
||||
if ( eventsToProcess == wxEVT_CATEGORY_ALL && wxTheApp )
|
||||
wxTheApp->ProcessPendingEvents();
|
||||
|
||||
if (eventsToProcess != wxEVT_CATEGORY_CLIPBOARD)
|
||||
|
@@ -435,7 +435,7 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
|
||||
}
|
||||
|
||||
// if there are pending events, we must process them.
|
||||
if (wxTheApp)
|
||||
if ( eventsToProcess == wxEVT_CATEGORY_ALL && wxTheApp )
|
||||
wxTheApp->ProcessPendingEvents();
|
||||
|
||||
// put back unprocessed events in the queue
|
||||
|
@@ -400,7 +400,7 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
|
||||
//
|
||||
// If they are pending events, we must process them.
|
||||
//
|
||||
if (wxTheApp)
|
||||
if (eventsToProcess == wxEVT_CATEGORY_ALL && wxTheApp)
|
||||
{
|
||||
wxTheApp->ProcessPendingEvents();
|
||||
wxTheApp->HandleSockets();
|
||||
|
@@ -214,7 +214,7 @@ bool wxCFEventLoop::YieldFor(long eventsToProcess)
|
||||
while ( ProcessIdle() ) {}
|
||||
|
||||
// if there are pending events, we must process them.
|
||||
if (wxTheApp)
|
||||
if ( eventsToProcess == wxEVT_CATEGORY_ALL && wxTheApp )
|
||||
wxTheApp->ProcessPendingEvents();
|
||||
|
||||
#if wxUSE_LOG
|
||||
|
Reference in New Issue
Block a user