summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-03-13 14:04:05 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-03-14 09:11:44 +0000
commit550d7930d1deed4fa40da0edf2c7a9de4dc0ffd3 (patch)
tree20f7b4e03c137add6316501b7d955def0774fcc7 /src/plugins/platforms
parente83247a2b96e657b43d86df93b5e67d9f5d63d99 (diff)
xcb: send keyboard modifiers with every QTabletEvent
Task-number: QTBUG-59415 Change-Id: If64a6513131fd85189e3621cb2a105e80e919ecf Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index 4a30f7b7bc..14c138a911 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -1176,6 +1176,7 @@ void QXcbConnection::xi2ReportTabletEvent(const void *event, TabletData *tabletD
if (!xcbWindow)
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);
@@ -1217,18 +1218,18 @@ void QXcbConnection::xi2ReportTabletEvent(const void *event, TabletData *tabletD
if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled()))
qCDebug(lcQpaXInputEvents, "XI2 event on tablet %d with tool %s type %s seq %d detail %d time %d "
- "pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf",
+ "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),
- (int)tabletData->buttons, pressure, xTilt, yTilt, rotation);
+ (int)tabletData->buttons, pressure, xTilt, yTilt, rotation, (int)modifiers);
QWindowSystemInterface::handleTabletEvent(window, ev->time, local, global,
tabletData->tool, tabletData->pointerType,
tabletData->buttons, pressure,
xTilt, yTilt, tangentialPressure,
- rotation, 0, tabletData->serialId);
+ rotation, 0, tabletData->serialId, modifiers);
}
QXcbConnection::TabletData *QXcbConnection::tabletDataForDevice(int id)