Don't log error from wxMSW wxWakeUpIdle().

This is not necessary as there is nothing that can be done about this error
anyhow and the function still "works" even if it occurs (it doesn't wake up
anything but it is not necessary to do it if the message queue is already
full) and, worse, results in a crash due to stack overflow.

Closes #15951.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-02-07 15:02:36 +00:00
parent 2dfa6e6aa8
commit 10597ecd04

View File

@ -819,11 +819,15 @@ void wxApp::WakeUpIdle()
if ( !::PeekMessage(&msg, hwndTop, 0, 1, PM_NOREMOVE) ||
::PeekMessage(&msg, hwndTop, 1, 1, PM_NOREMOVE) )
{
if ( !::PostMessage(hwndTop, WM_NULL, 0, 0) )
{
// should never happen
wxLogLastError(wxT("PostMessage(WM_NULL)"));
}
// If this fails too, there is really not much we can do, but then
// neither do we need to, as it normally indicates that the window
// queue is full to the brim with the messages and so the main loop
// is running and doesn't need to be woken up.
//
// Notice that we especially should not try use wxLogLastError()
// here as this would lead to another call to wxWakeUpIdle() from
// inside wxLog and stack overflow due to the resulting recursion.
::PostMessage(hwndTop, WM_NULL, 0, 0);
}
}
#if wxUSE_THREADS