diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-10-21 10:33:35 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-10-21 10:33:35 (GMT) |
commit | e28e6772e79df9b2adf70e21969af8cac28dc9cf (patch) | |
tree | 714427343d907dbb55557708f13ea15c10757b90 /src/corelib/kernel | |
parent | 4e22238ac86eb7ddb88b7dec73d419767da72323 (diff) | |
download | Qt-e28e6772e79df9b2adf70e21969af8cac28dc9cf.zip Qt-e28e6772e79df9b2adf70e21969af8cac28dc9cf.tar.gz Qt-e28e6772e79df9b2adf70e21969af8cac28dc9cf.tar.bz2 |
Use GetStatusQueue() to look for timer and input messages
This function works more reliably than PeekMessage() with different
flags.
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index f7de29d..eca94fc 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -482,8 +482,7 @@ LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp) int localSerialNumber = d->serialNumber; MSG peeked; - if (PeekMessage(&peeked, d->internalHwnd, WM_TIMER, WM_TIMER, PM_NOREMOVE) - || PeekMessage(&peeked, NULL, 0, 0, PM_NOREMOVE | PM_QS_INPUT)) { + if (GetQueueStatus(QS_INPUT | QS_RAWINPUT | QS_TIMER) != 0) { // delay the next pass of sendPostedEvents() until we get the special // WM_TIMER, which allows all pending Windows messages to be processed SetTimer(d->internalHwnd, ~0u, 0, 0); |