backends/wayland: Fix input timestamp in relative motion events

RelativePointer::relativeMotion already provides us timestamps with
microseconds granularity, so we need to convert timestamps in vice versa
order.
This commit is contained in:
Vlad Zahorodnii 2022-11-27 13:45:04 +02:00
parent a93ccbd7e7
commit 7c0cdcf472

View file

@ -213,7 +213,7 @@ WaylandInputDevice::WaylandInputDevice(KWayland::Client::RelativePointer *relati
, m_relativePointer(relativePointer)
{
connect(relativePointer, &RelativePointer::relativeMotion, this, [this](const QSizeF &delta, const QSizeF &deltaNonAccelerated, quint64 timestamp) {
Q_EMIT pointerMotion(QSIZE_TO_QPOINT(delta), QSIZE_TO_QPOINT(deltaNonAccelerated), timestamp, timestamp * 1000, this);
Q_EMIT pointerMotion(QSIZE_TO_QPOINT(delta), QSIZE_TO_QPOINT(deltaNonAccelerated), timestamp / 1000, timestamp, this);
});
}