diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-01-24 14:52:48 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-27 08:15:39 +0100 |
commit | aac064b1c74fc902eb0d3ffd4fa79acf1c85a6df (patch) | |
tree | a2f0a2c9c7a7b9ce30420cd192f5a1a000559675 | |
parent | c071b165a35e56c1f070813212ef8ff899732da5 (diff) | |
download | qtbase-aac064b1c74fc902eb0d3ffd4fa79acf1c85a6df.tar.gz qtbase-aac064b1c74fc902eb0d3ffd4fa79acf1c85a6df.tar.bz2 qtbase-aac064b1c74fc902eb0d3ffd4fa79acf1c85a6df.zip |
X11: build again on Linux distros that don't have XInput 2.2
fixed1616ToReal is needed by the XI2 tablet event debugging added in
ecf11d62fc6f57cccf6f3326e768b1c7cabbd0b3, so it needs to be available
if tablet events are supported and XI 2.2 events are not (older Linux
distros).
Change-Id: Id763d585790a9f037abc408dfba4ab5eec6dd421
Task-number: QTBUG-36437
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index a571f16eb6..a2ef8bf20f 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -287,12 +287,14 @@ XInput2DeviceData *QXcbConnection::deviceForId(int id) return dev; } -#ifdef XCB_USE_XINPUT22 +#if defined(XCB_USE_XINPUT22) || !defined(QT_NO_TABLETEVENT) static qreal fixed1616ToReal(FP1616 val) { return (qreal(val >> 16)) + (val & 0xFF) / (qreal)0xFF; } +#endif +#ifdef XCB_USE_XINPUT22 static qreal valuatorNormalized(double value, XIValuatorClassInfo *vci) { if (value > vci->max) |