xcb: fix seatId to be master-keyboard-id << 16 | master-pointer-id
Amends 6589f2ed0c
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>
This commit is contained in:
parent
e2b2cd9397
commit
4c9bab54f0
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user