diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-10-28 08:42:09 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-10-28 08:42:09 (GMT) |
commit | 0444453661df0f56fd034778028c7abdc0b621cc (patch) | |
tree | f4068e84236d0a57b01be57413bc8117acdc3d87 /src | |
parent | 93555ce80fbdffeba6dec6065a976269c192b4af (diff) | |
download | Qt-0444453661df0f56fd034778028c7abdc0b621cc.zip Qt-0444453661df0f56fd034778028c7abdc0b621cc.tar.gz Qt-0444453661df0f56fd034778028c7abdc0b621cc.tar.bz2 |
Don't stop event processing at the second WM_QT_SENDPOSTEDEVENTS
We should continue processing as much as we can, and report the
WM_QT_SENDPOSTEDEVENTS at the end of processEvents().
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index df4c02d..d13e1d1 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -663,11 +663,12 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags) bool canWait; bool retVal = false; + bool seenWM_QT_SENDPOSTEDEVENTS = false; + bool needWM_QT_SENDPOSTEDEVENTS = false; do { DWORD waitRet = 0; HANDLE pHandles[MAXIMUM_WAIT_OBJECTS - 1]; QVarLengthArray<MSG> processedTimers; - bool seenWM_QT_SENDPOSTEDEVENTS = false; while (!d->interrupt) { DWORD nCount = d->winEventNotifierList.count(); Q_ASSERT(nCount < MAXIMUM_WAIT_OBJECTS - 1); @@ -717,8 +718,8 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags) if (haveMessage) { if (msg.message == WM_QT_SENDPOSTEDEVENTS && !(flags & QEventLoop::EventLoopExec)) { if (seenWM_QT_SENDPOSTEDEVENTS) { - PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0); - break; + needWM_QT_SENDPOSTEDEVENTS = true; + continue; } seenWM_QT_SENDPOSTEDEVENTS = true; } else if (msg.message == WM_TIMER) { @@ -770,6 +771,9 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags) } } while (canWait); + if (needWM_QT_SENDPOSTEDEVENTS) + PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0); + return retVal; } |