From 7c0cdcf4720c323b19074529e53946ecf875a657 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 27 Nov 2022 13:45:04 +0200 Subject: [PATCH] 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. --- src/backends/wayland/wayland_backend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/wayland/wayland_backend.cpp b/src/backends/wayland/wayland_backend.cpp index 5c0f124422..ad061cf50a 100644 --- a/src/backends/wayland/wayland_backend.cpp +++ b/src/backends/wayland/wayland_backend.cpp @@ -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); }); }