diff options
-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) |