From 52bc65dc8a38a042a9255e6805c5a3711188c647 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 9 May 2012 11:22:07 +0300 Subject: Enable float coords in evdevtouch There is no reason to truncate the touch position. Change-Id: I2bdcd43d3bb06a664e909d92704a701ece603847 Reviewed-by: Paul Olav Tvete Reviewed-by: Girish Ramakrishnan --- src/plugins/generic/evdevtouch/qevdevtouch.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/generic') diff --git a/src/plugins/generic/evdevtouch/qevdevtouch.cpp b/src/plugins/generic/evdevtouch/qevdevtouch.cpp index 327f64412a..01007b74dd 100644 --- a/src/plugins/generic/evdevtouch/qevdevtouch.cpp +++ b/src/plugins/generic/evdevtouch/qevdevtouch.cpp @@ -474,11 +474,11 @@ void QTouchScreenData::reportPoints() // Generate a screen position that is always inside the active window // or the primary screen. - const int wx = winRect.left() + int(tp.normalPosition.x() * winRect.width()); - const int wy = winRect.top() + int(tp.normalPosition.y() * winRect.height()); + const qreal wx = winRect.left() + tp.normalPosition.x() * winRect.width(); + const qreal wy = winRect.top() + tp.normalPosition.y() * winRect.height(); const qreal sizeRatio = (winRect.width() + winRect.height()) / qreal(hw_w + hw_h); - tp.area = QRect(0, 0, tp.area.width() * sizeRatio, tp.area.height() * sizeRatio); - tp.area.moveCenter(QPoint(wx, wy)); + tp.area = QRectF(0, 0, tp.area.width() * sizeRatio, tp.area.height() * sizeRatio); + tp.area.moveCenter(QPointF(wx, wy)); // Calculate normalized pressure. if (!hw_pressure_min && !hw_pressure_max) -- cgit v1.2.3