X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88379f1f2ecb3221dacb9c0dc544059d158d1b74..0ce5a3a853f2eaa7fe58e494aa0605918531ff3b:/src/msw/window.cpp?ds=inline diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 88dfe6c276..a2c31ccb8f 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -5815,7 +5815,11 @@ public: 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(); }