Enable float coords in evdevtouch

There is no reason to truncate the touch position.

Change-Id: I2bdcd43d3bb06a664e909d92704a701ece603847
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
This commit is contained in:
Laszlo Agocs 2012-05-09 11:22:07 +03:00 committed by Qt by Nokia
parent 4f6b1cad56
commit 52bc65dc8a

View File

@ -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)