From 7c2850cd8f1029b74d960fad5754320b61176f46 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 24 Jul 2017 09:35:12 +0200 Subject: QEventDispatcherWin32: Check for WM_QT_SOCKETNOTIFIER on internal window only Restrict the checking to the internal window handle to prevent it being thrown off by other WM_USER messages used by applications. Complements change 124b9a6ff89da8be83a256135ec6c4d0603e9a6f. Task-number: QTBUG-62083 Change-Id: Ifb1b00e4ff70cb7e53873943e46cea0d72ff6257 Reviewed-by: Alex Trotsenko Reviewed-by: Thiago Macieira --- src/corelib/kernel/qeventdispatcher_win.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib') diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index 0952464f53..7a6149b405 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -207,7 +207,8 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA // in the queue. WM_QT_ACTIVATENOTIFIERS will be posted again as a result of // event processing. MSG msg; - if (!PeekMessage(&msg, 0, WM_QT_SOCKETNOTIFIER, WM_QT_SOCKETNOTIFIER, PM_NOREMOVE) + if (!PeekMessage(&msg, d->internalHwnd, + WM_QT_SOCKETNOTIFIER, WM_QT_SOCKETNOTIFIER, PM_NOREMOVE) && d->queuedSocketEvents.isEmpty()) { // register all socket notifiers for (QSFDict::iterator it = d->active_fd.begin(), end = d->active_fd.end(); -- cgit v1.2.3