diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-06-18 12:00:30 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-06-18 19:22:27 +0200 |
commit | 4c9bab54f056e6a612082fe954ca8814c3cba062 (patch) | |
tree | e6c8aaecd977616830122a329b9ac60321b37a2d /src | |
parent | e2b2cd9397c76e91ac1ebe493bcac7696767c02e (diff) |
xcb: fix seatId to be master-keyboard-id << 16 | master-pointer-id
Amends 6589f2ed0cf78c9b8a5bdffcdc458dc40a974c60 to match the comment.
If the master device we found is a keyboard, then its own ID is the
keyboard ID, and the attachment is a pointer; but if the master device
we found is a pointer, then its attachment is the master keyboard.
In practice, this gives all devices the same seatId on normal
single-user sessions.
Change-Id: Ibe7d7cdee7b3fe642efacd0349c109271059cb36
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index f7d7bd755a..d93cbc2822 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -453,7 +453,7 @@ void QXcbConnection::xi2SetupDevices() case XCB_INPUT_DEVICE_TYPE_MASTER_KEYBOARD: { auto dev = new QInputDevice(QString::fromUtf8(xcb_input_xi_device_info_name(deviceInfo)), deviceInfo->deviceid, QInputDevice::DeviceType::Keyboard, - QString::number(deviceInfo->attachment << 16 | deviceInfo->deviceid, 16), this); + QString::number(deviceInfo->deviceid << 16 | deviceInfo->attachment, 16), this); QWindowSystemInterface::registerInputDevice(dev); } break; case XCB_INPUT_DEVICE_TYPE_MASTER_POINTER: { |