diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2014-09-01 17:35:35 +0400 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-09-05 15:23:30 +0200 |
commit | f721a85b1e2a5c84a1a1a4d3f5b1c7fad7de854b (patch) | |
tree | 887d181893e67852be3b6ab08ca9d9c9e3197585 /src | |
parent | eac2876d55732696991c4629e6bd88e302a72f56 (diff) |
xcb: fix coordinates of touch points
Fix conversion from FP1616 to qreal.
Use 16-bit mask 0xFFFF instead of 8-bit mask 0xFF.
Change-Id: I0ee39b2e298b7ff7d7a67981925374d6a18f1474
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 84d00d0e09..60a36a8da1 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -413,7 +413,7 @@ XInput2TouchDeviceData *QXcbConnection::touchDeviceForId(int id) #if defined(XCB_USE_XINPUT21) || !defined(QT_NO_TABLETEVENT) static qreal fixed1616ToReal(FP1616 val) { - return (qreal(val >> 16)) + (val & 0xFF) / (qreal)0xFF; + return (qreal(val >> 16)) + (val & 0xFFFF) / (qreal)0xFFFF; } #endif // defined(XCB_USE_XINPUT21) || !defined(QT_NO_TABLETEVENT) |