diff options
author | Rainer Keller <Rainer.Keller@qt.io> | 2019-10-10 13:32:31 +0200 |
---|---|---|
committer | Rainer Keller <Rainer.Keller@qt.io> | 2019-10-11 12:51:23 +0200 |
commit | 23d73208524d3ab2166121d08594da88e6b4460b (patch) | |
tree | 6d76b3120b03d8455c865134c9082132e64a2b4e /src/gui/kernel/qwindowsysteminterface_p.h | |
parent | c54083ff933830a28f43551b9c3b132bfb11492d (diff) |
Protect global variable g_pointIdMap with mutexes
The evdev touch handler is thread based and calls
QWindowSystemInterface::handleTouchEvent. The global variable
in qwindowsysteminterface.cpp is used without being protected by mutexes
which causes data loss and crashes when multiple touch screens are used.
Fixes: QTBUG-63584
Change-Id: I8b5bb04cc517fab96ac428b2bd2bc128b2ca1a54
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_p.h')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h index 540170f733..55fd181ef0 100644 --- a/src/gui/kernel/qwindowsysteminterface_p.h +++ b/src/gui/kernel/qwindowsysteminterface_p.h @@ -528,6 +528,7 @@ public: static QWaitCondition eventsFlushed; static QMutex flushEventMutex; + static QMutex pointIdMapMutex; static QAtomicInt eventAccepted; static QList<QTouchEvent::TouchPoint> |