summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_win_p.h
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2017-01-21 18:09:11 +0200
committerAlex Trotsenko <alex1973tr@gmail.com>2017-05-03 06:46:18 +0000
commit124b9a6ff89da8be83a256135ec6c4d0603e9a6f (patch)
treebd85829c22266b333ed55fb074b90018b919771f /src/corelib/kernel/qeventdispatcher_win_p.h
parent2f92bd7cd7452d97c344d373c7e59b34f99a9c42 (diff)
Improve suppression of spurious socket notifications under Windows
There were still two cases where spurious notifications would be possible: - user calls hasPendingDatagrams()/pendingDatagramSize() on UDP socket somewhere outside the slot connected to readyRead() signal (::WSARecvFrom posts FD_READ notification, even if a notification for incoming datagram already exists in the message queue); - a socket was registered to receive several types of event and WM_QT_ACTIVATENOTIFIERS message is located between the different events for this socket in the queue. Provided patch ensures that the message queue is synchronized with the Qt event processing mechanism and adds a way to detect spurious notifications inside the window procedure. Task-number: QTBUG-58214 Change-Id: I49609dace601f300de09875ff1653617efabd72f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Peter Seiderer <ps.report@gmx.net>
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_win_p.h')
-rw-r--r--src/corelib/kernel/qeventdispatcher_win_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h
index 423dc5b169..f6d1bffdf5 100644
--- a/src/corelib/kernel/qeventdispatcher_win_p.h
+++ b/src/corelib/kernel/qeventdispatcher_win_p.h
@@ -126,9 +126,10 @@ typedef QHash<int, QSockNot *> QSNDict;
struct QSockFd {
long event;
+ long mask;
bool selected;
- explicit inline QSockFd(long ev = 0) : event(ev), selected(false) { }
+ explicit inline QSockFd(long ev = 0, long ma = 0) : event(ev), mask(ma), selected(false) { }
};
typedef QHash<int, QSockFd> QSFDict;