Handle XCB_INPUT_DEVICE_TYPE_MASTER_POINTER properly
Make sure we use the new QXcbScrollingDevice class for the "core pointer" as well. Change-Id: I97575e8125cbb2aa280662aa675e61021c21ea59 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>bb10
parent
9a237257c4
commit
24cf218b39
|
|
@ -472,10 +472,9 @@ void QXcbConnection::xi2SetupDevices()
|
|||
} break;
|
||||
case XCB_INPUT_DEVICE_TYPE_MASTER_POINTER: {
|
||||
m_xiMasterPointerIds.append(deviceInfo->deviceid);
|
||||
auto dev = new QPointingDevice(QString::fromUtf8(xcb_input_xi_device_info_name(deviceInfo)), deviceInfo->deviceid,
|
||||
QInputDevice::DeviceType::Mouse, QPointingDevice::PointerType::Generic,
|
||||
QInputDevice::Capability::Position | QInputDevice::Capability::Scroll | QInputDevice::Capability::Hover,
|
||||
1, 32, QString::number(deviceInfo->attachment << 16 | deviceInfo->deviceid, 16), QPointingDeviceUniqueId(), this);
|
||||
auto dev = new QXcbScrollingDevice(QString::fromUtf8(xcb_input_xi_device_info_name(deviceInfo)), deviceInfo->deviceid,
|
||||
QInputDevice::Capability::Position | QInputDevice::Capability::Scroll | QInputDevice::Capability::Hover,
|
||||
32, QString::number(deviceInfo->attachment << 16 | deviceInfo->deviceid, 16), this);
|
||||
QWindowSystemInterface::registerInputDevice(dev);
|
||||
continue;
|
||||
} break;
|
||||
|
|
|
|||
|
|
@ -69,6 +69,12 @@ public:
|
|||
QXcbScrollingDevice(QXcbScrollingDevicePrivate &d, QObject *parent)
|
||||
: QPointingDevice(d, parent) {}
|
||||
|
||||
QXcbScrollingDevice(const QString &name, qint64 deviceId, Capabilities caps, int buttonCount,
|
||||
const QString &seatName = QString(), QObject *parent = nullptr)
|
||||
: QPointingDevice(*new QXcbScrollingDevicePrivate(name, deviceId, caps, buttonCount, seatName), parent)
|
||||
{
|
||||
}
|
||||
|
||||
inline static QXcbScrollingDevicePrivate *get(QXcbScrollingDevice *q)
|
||||
{
|
||||
return static_cast<QXcbScrollingDevicePrivate *>(QObjectPrivate::get(q));
|
||||
|
|
|
|||
Loading…
Reference in New Issue