From 34ea3c74912db9d9142c1af0342f911f748e128d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Dec 2004 11:49:32 +0000 Subject: [PATCH] only handle WM_NULL in wxIdleWakeUpModule if it is being removed from queue (part of patch 1080770) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); } -- 2.45.2