summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_win.cpp')
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 569fbc2796..bbd442d570 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -942,7 +942,8 @@ void QEventDispatcherWin32::activateEventNotifiers()
for (int i = d->winEventNotifierList.count(); --i >= 0;) {
QWinEventNotifier *notifier = d->winEventNotifierList.at(i);
QWinEventNotifierPrivate *nd = QWinEventNotifierPrivate::get(notifier);
- if (WaitForSingleObject(nd->handleToEvent, 0) == WAIT_OBJECT_0) {
+ if (nd->signaledCount.load() != 0) {
+ --nd->signaledCount;
nd->unregisterWaitObject();
d->activateEventNotifier(notifier);
}