Commit ba786ee2 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[server] Generate correct touch ids

Summary:
testWaylandSeat fails because the seat interface generates incorrect id
for the second touch.

Test Plan: testWaylandSeat passes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18628
parent 0d170cec
......@@ -1346,7 +1346,7 @@ void SeatInterface::setFocusedTouchSurfacePosition(const QPointF &surfacePositio
qint32 SeatInterface::touchDown(const QPointF &globalPosition)
{
Q_D();
const qint32 id = d->globalTouch.ids.isEmpty() ? 0 : d->globalTouch.ids.last() + 1;
const qint32 id = d->globalTouch.ids.isEmpty() ? 0 : d->globalTouch.ids.lastKey() + 1;
const qint32 serial = display()->nextSerial();
const auto pos = globalPosition - d->globalTouch.focus.offset;
for (auto it = d->globalTouch.focus.touchs.constBegin(), end = d->globalTouch.focus.touchs.constEnd(); it != end; ++it) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment