Changeset View
Changeset View
Standalone View
Standalone View
src/server/seat_interface.cpp
Show First 20 Lines • Show All 1340 Lines • ▼ Show 20 Line(s) | |||||
1341 | { | 1341 | { | ||
1342 | Q_D(); | 1342 | Q_D(); | ||
1343 | d->globalTouch.focus.offset = surfacePosition; | 1343 | d->globalTouch.focus.offset = surfacePosition; | ||
1344 | } | 1344 | } | ||
1345 | 1345 | | |||
1346 | qint32 SeatInterface::touchDown(const QPointF &globalPosition) | 1346 | qint32 SeatInterface::touchDown(const QPointF &globalPosition) | ||
1347 | { | 1347 | { | ||
1348 | Q_D(); | 1348 | Q_D(); | ||
1349 | const qint32 id = d->globalTouch.ids.isEmpty() ? 0 : d->globalTouch.ids.last() + 1; | 1349 | const qint32 id = d->globalTouch.ids.isEmpty() ? 0 : d->globalTouch.ids.lastKey() + 1; | ||
1350 | const qint32 serial = display()->nextSerial(); | 1350 | const qint32 serial = display()->nextSerial(); | ||
1351 | const auto pos = globalPosition - d->globalTouch.focus.offset; | 1351 | const auto pos = globalPosition - d->globalTouch.focus.offset; | ||
1352 | for (auto it = d->globalTouch.focus.touchs.constBegin(), end = d->globalTouch.focus.touchs.constEnd(); it != end; ++it) { | 1352 | for (auto it = d->globalTouch.focus.touchs.constBegin(), end = d->globalTouch.focus.touchs.constEnd(); it != end; ++it) { | ||
1353 | (*it)->down(id, serial, pos); | 1353 | (*it)->down(id, serial, pos); | ||
1354 | } | 1354 | } | ||
1355 | 1355 | | |||
1356 | if (id == 0) { | 1356 | if (id == 0) { | ||
1357 | d->globalTouch.focus.firstTouchPos = globalPosition; | 1357 | d->globalTouch.focus.firstTouchPos = globalPosition; | ||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |