From 413a40f5c641b6908f73aadcdea3572516c7bd3c Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Fri, 19 Feb 2010 13:12:06 +0100 Subject: Ensure that posted events are sent on Windows Commit f21d183 introduced a GetMessage hook that would try to post a message to the Windows queue if the hook received an event that was not the WM_QT_SENDPOSTEDEVENTS message. However, the logic used is flawed, and would never post the message unless we received a message for a window that was not the event dispatcher's internal window. Timer messages DO go to the internal window, and the last handled timer message SHOULD trigger the hook to post a new WM_QT_SENDPOSTEDEVENTS, but due to the flawed logic, it would not. The most notable side effect of this bug is that regular repaints and animations would not become visible unless the user moved the mouse or used the keyboard. Task-number: QTBUG-7728 Reviewed-by: Andreas Aardal Hanssen Fix verified by 2 users in the Jira report mentioned above. --- src/corelib/kernel/qeventdispatcher_win.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/kernel/qeventdispatcher_win.cpp') diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index 93becc8c4a..8010a76bda 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -510,8 +510,8 @@ LRESULT CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp) MSG *msg = (MSG *) lp; if (localSerialNumber != d->lastSerialNumber // if this message IS the one that triggers sendPostedEvents(), no need to post it again - && msg->hwnd != d->internalHwnd - && msg->message != WM_QT_SENDPOSTEDEVENTS) { + && (msg->hwnd != d->internalHwnd + || msg->message != WM_QT_SENDPOSTEDEVENTS)) { PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0); } } -- cgit v1.2.3