Ensure that wxApp::Yield is always processing pending event by creating a
temporary event loop if needed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -74,11 +74,10 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
|
||||
wxLog::Suspend();
|
||||
|
||||
if ( wxEventLoop::GetActive() )
|
||||
{
|
||||
while (wxEventLoop::GetActive()->Pending())
|
||||
wxEventLoop::GetActive()->Dispatch();
|
||||
}
|
||||
// A guarentee that there will be an active event loop:
|
||||
wxEventLoopGuarantor dummyLoopIfNeeded;
|
||||
while (wxEventLoop::GetActive()->Pending())
|
||||
wxEventLoop::GetActive()->Dispatch();
|
||||
|
||||
/* it's necessary to call ProcessIdle() to update the frames sizes which
|
||||
might have been changed (it also will update other things set from
|
||||
|
||||
Reference in New Issue
Block a user