git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30951
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
static LRESULT CALLBACK MsgHookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
MSG *msg = (MSG*)lParam;
- if ( msg->message == WM_NULL )
+
+ // only process the message if it is actually going to be removed from
+ // the message queue, this prevents that the same event from being
+ // processed multiple times if now someone just called PeekMessage()
+ if ( msg->message == WM_NULL && wParam == PM_REMOVE )
{
wxTheApp->ProcessPendingEvents();
}