summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,