From 4c9bab54f056e6a612082fe954ca8814c3cba062 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 18 Jun 2020 12:00:30 +0200 Subject: 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 --- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: { -- cgit v1.2.3