summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-05-09 11:25:44 +0300
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-05-09 14:17:07 +0200
commit7f71672e27a2cbb7fb19333b77d7b3e4d4a068b9 (patch)
tree605ccf104302781f2646c416c5317cf583c14950 /tests
parent9bda431e60b5626b7aeb01dcfa6fcb183ee17258 (diff)
Start using the new wl_fixed_t type properly
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 <samuel.rodal@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/client/mockinput.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/client/mockinput.cpp b/tests/auto/client/mockinput.cpp
index 4138e8f38..f2a7640b5 100644
--- a/tests/auto/client/mockinput.cpp
+++ b/tests/auto/client/mockinput.cpp
@@ -106,8 +106,10 @@ void Compositor::sendMousePress(void *data, const QList<QVariant> &parameters)
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);
}