summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-03-03 09:52:18 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-04-26 18:57:57 +0000
commit6107f63f934b2342bc34d3bc720f267159204cf9 (patch)
treecf9dc9859c82973695320611c764695a0bae195d /src/plugins/platforms/xcb
parent5218a80bd1273d37c251a0f46a9ec711989baa5b (diff)
QXcbConnection::xi2ReportTabletEvent: use fixed1616ToReal
This should not change the result since fixed1616ToReal also divides by 65536. It's just to make it consistent with the other places that we use fixed1616ToReal. Change-Id: I96b3a07d1cbc98d7bdbe7a3b6035b196e34a5abc Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index 9902d16553..730473b983 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -1178,9 +1178,8 @@ void QXcbConnection::xi2ReportTabletEvent(const void *event, TabletData *tabletD
return;
QWindow *window = xcbWindow->window();
const Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(ev->mods.effective_mods);
- const double scale = 65536.0;
- QPointF local(ev->event_x / scale, ev->event_y / scale);
- QPointF global(ev->root_x / scale, ev->root_y / scale);
+ QPointF local(fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y));
+ QPointF global(fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y));
double pressure = 0, rotation = 0, tangentialPressure = 0;
int xTilt = 0, yTilt = 0;
@@ -1222,8 +1221,7 @@ void QXcbConnection::xi2ReportTabletEvent(const void *event, TabletData *tabletD
"pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf modifiers 0x%x",
tabletData->deviceId, toolName(tabletData->tool), pointerTypeName(tabletData->pointerType),
ev->sequenceNumber, ev->detail, ev->time,
- fixed1616ToReal(ev->event_x), fixed1616ToReal(ev->event_y),
- fixed1616ToReal(ev->root_x), fixed1616ToReal(ev->root_y),
+ local.x(), local.y(), global.x(), global.y(),
(int)tabletData->buttons, pressure, xTilt, yTilt, rotation, (int)modifiers);
QWindowSystemInterface::handleTabletEvent(window, ev->time, local, global,