diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2012-05-09 11:22:07 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-09 17:51:18 +0200 |
commit | 52bc65dc8a38a042a9255e6805c5a3711188c647 (patch) | |
tree | c6706745a4dbd1af58afff228b185a4564dc1f88 /src/plugins/generic | |
parent | 4f6b1cad565ab290af4e92e1eec48f279301dc04 (diff) |
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>
Diffstat (limited to 'src/plugins/generic')
-rw-r--r-- | src/plugins/generic/evdevtouch/qevdevtouch.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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) |