From aac064b1c74fc902eb0d3ffd4fa79acf1c85a6df Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 24 Jan 2014 14:52:48 +0100 Subject: [PATCH] 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 Reviewed-by: Wolfgang Bremer --- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)