diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-10-21 10:36:56 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-21 12:34:50 +0200 |
commit | d40f4105cde2c7ad3602dbfe80b8597bd1193349 (patch) | |
tree | b19ddb65f65b386b42d42249f057b5e162a2ac3e /src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp | |
parent | c245a70986e384cd189580ed022ccbe5056eda8a (diff) |
Remove mtdev dependency from the touchscreen QPA plugin.
There is no reason to enforce the usage of the mtdev library. As long
as ABS_MT_TRACKING_ID is provided protocol type A is perfectly enough.
This makes the plugin more suitable for embedded systems.
Change-Id: I73ce4a1056a6dc27daacb69dc4761bca393a7e43
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Diffstat (limited to 'src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp')
-rw-r--r-- | src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp index 284330fd32..d9ec92cda7 100644 --- a/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp +++ b/src/plugins/generic/touchscreen/qtoucheventsenderqpa.cpp @@ -86,15 +86,8 @@ void QTouchEventSenderQPA::touch_point(QEvent::Type state, for (int i = 0; i < touchPoints.size(); ++i) { QWindowSystemInterface::TouchPoint &tp(touchPoints[i]); - // Translate so that (0, 0) is the top-left corner. - const int hw_x = qBound(hw_range_x_min, int(tp.area.left()), hw_range_x_max) - hw_range_x_min; - const int hw_y = qBound(hw_range_y_min, int(tp.area.top()), hw_range_y_max) - hw_range_y_min; - - // Get a normalized position in range 0..1. const int hw_w = hw_range_x_max - hw_range_x_min; const int hw_h = hw_range_y_max - hw_range_y_min; - tp.normalPosition = QPointF(hw_x / qreal(hw_w), - hw_y / qreal(hw_h)); qreal nx = tp.normalPosition.x(); qreal ny = tp.normalPosition.y(); |