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>
This commit is contained in:
parent
eac2876d55
commit
f721a85b1e
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user