summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/coreprotocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/client/shared/coreprotocol.cpp')
-rw-r--r--tests/auto/client/shared/coreprotocol.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/client/shared/coreprotocol.cpp b/tests/auto/client/shared/coreprotocol.cpp
index 120c256c6..b0be2cb4e 100644
--- a/tests/auto/client/shared/coreprotocol.cpp
+++ b/tests/auto/client/shared/coreprotocol.cpp
@@ -424,6 +424,18 @@ uint Touch::sendUp(wl_client *client, int id)
return serial;
}
+void Touch::sendMotion(wl_client *client, const QPointF &position, int id)
+{
+ wl_fixed_t x = wl_fixed_from_double(position.x());
+ wl_fixed_t y = wl_fixed_from_double(position.y());
+
+ auto time = m_seat->m_compositor->currentTimeMilliseconds();
+
+ const auto touchResources = resourceMap().values(client);
+ for (auto *r : touchResources)
+ wl_touch::send_motion(r->handle, time, id, x, y);
+}
+
void Touch::sendFrame(wl_client *client)
{
const auto touchResources = resourceMap().values(client);