Work around the problem with not exiting event loop under MSW.
Changes of r71304 broke the event loop termination under MSW, limit them to only the case in which they were really needed, i.e. when loop is really exited by a pending event handler. This is only a temporary solution, we need something better in longer term. See #14250. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f330dce9b7
commit
1b29603d20
@ -105,12 +105,14 @@ bool wxEventLoopManual::ProcessEvents()
|
||||
// executed)
|
||||
if ( wxTheApp )
|
||||
{
|
||||
const bool hadExitedBefore = m_shouldExit;
|
||||
|
||||
wxTheApp->ProcessPendingEvents();
|
||||
|
||||
// One of the pending event handlers could have decided to exit the
|
||||
// loop so check for the flag before trying to dispatch more events
|
||||
// (which could block indefinitely if no more are coming).
|
||||
if ( m_shouldExit )
|
||||
if ( !hadExitedBefore && m_shouldExit )
|
||||
{
|
||||
// We still need to dispatch any remaining pending events, just as
|
||||
// we do in the event loop in Run() if the loop is exited from a
|
||||
|
Loading…
Reference in New Issue
Block a user