Don't rely on getting WM_NULL messages in wxIdleWakeUpModule

Since the switch to using an event object for idle handling wakeup,
WM_NULLs are not being sent any longer, so wxIdleWakeUpModule didn't do
anything, resulting in pending event dispatching being paused while our
event loop was not running, as it happened, for example, while the
window was resized.

See #17579.
This commit is contained in:
Vadim Zeitlin
2018-01-13 17:33:09 +01:00
parent 91aed00288
commit 9b4759d7b6
5 changed files with 31 additions and 13 deletions

View File

@@ -790,6 +790,16 @@ void wxApp::WakeUpIdle()
evtLoop->WakeUp();
}
void wxApp::MSWProcessPendingEventsIfNeeded()
{
// The cast below is safe as wxEventLoop derives from wxMSWEventLoopBase in
// both console and GUI applications.
wxMSWEventLoopBase * const evtLoop
= static_cast<wxMSWEventLoopBase *>(wxEventLoop::GetActive());
if ( evtLoop && evtLoop->MSWIsWakeUpRequested() )
ProcessPendingEvents();
}
// ----------------------------------------------------------------------------
// other wxApp event handlers
// ----------------------------------------------------------------------------