From 837edd2e7818f85c2889f29e6f8fd6712004157a Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 9 May 2012 11:25:44 +0300 Subject: [PATCH] Start using the new wl_fixed_t type properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mouse and touch coordinates cannot just be treated as integers anymore, they need to be converted from/to double using the helper functions. Some necessary QPoint -> QPointF changes have also been made. For the Qt-specific touch extension we will not switch to wl_fixed_t though. This is because the precision is unfortunately quite small (factor of 256 vs. 10000). Change-Id: I23deaaffe478a39495b12d336985bc62e38a6af4 Reviewed-by: Samuel Rødal --- tests/auto/wayland/mockinput.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/wayland/mockinput.cpp b/tests/auto/wayland/mockinput.cpp index 4138e8f3808..f2a7640b55d 100644 --- a/tests/auto/wayland/mockinput.cpp +++ b/tests/auto/wayland/mockinput.cpp @@ -106,8 +106,10 @@ void Compositor::sendMousePress(void *data, const QList ¶meters) return; QPoint pos = parameters.last().toPoint(); - wl_input_device_set_pointer_focus(&compositor->m_input, surface, pos.x(), pos.y()); - wl_input_device_send_motion(compositor->m_input.pointer_focus_resource, compositor->time(), pos.x(), pos.y()); + wl_input_device_set_pointer_focus(&compositor->m_input, surface, + wl_fixed_from_int(pos.x()), wl_fixed_from_int(pos.y())); + wl_input_device_send_motion(compositor->m_input.pointer_focus_resource, compositor->time(), + wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y())); wl_input_device_send_button(compositor->m_input.pointer_focus_resource, compositor->nextSerial(), compositor->time(), 0x110, 1); }