diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-02-19 12:12:06 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-02-19 12:12:06 (GMT) |
commit | 413a40f5c641b6908f73aadcdea3572516c7bd3c (patch) | |
tree | be2163f68a8ea269790b3cba83f4bbbbf3d23678 /src/corelib/kernel | |
parent | 85b82c845c32d383cdb9ec9f6ac21a0e86e4308a (diff) | |
download | Qt-413a40f5c641b6908f73aadcdea3572516c7bd3c.zip Qt-413a40f5c641b6908f73aadcdea3572516c7bd3c.tar.gz Qt-413a40f5c641b6908f73aadcdea3572516c7bd3c.tar.bz2 |
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.
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index 93becc8..8010a76 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); } } |