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
// executed)
if ( wxTheApp )
{
// 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).
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 ( !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
{
// 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