Skip to content

Commit

Permalink
[mer]: Fix race condition when delivering touch events. Contributes t…
Browse files Browse the repository at this point in the history
…o JB#37369.

'lastPoints' is used outside the mutex locked section, so
it naturally cannot be a const &. QVector copy-on-write will
now make this access safe across receiver and delivery thread.
  • Loading branch information
sletta authored and denexter committed Jun 5, 2018
1 parent d6b2103 commit 82cd179
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -890,7 +890,7 @@ void QEvdevTouchScreenHandlerThread::filterAndSendTouchPoints()
}

QList<QWindowSystemInterface::TouchPoint> points = m_handler->d->m_touchPoints;
const QList<QWindowSystemInterface::TouchPoint> &lastPoints = m_handler->d->m_lastTouchPoints;
QList<QWindowSystemInterface::TouchPoint> lastPoints = m_handler->d->m_lastTouchPoints;

m_handler->d->m_mutex.unlock();

Expand Down

0 comments on commit 82cd179

Please sign in to comment.