Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.0, 6.5.0 RC
-
None
-
fbe6f3f4b (dev), 19eaf9f0e (6.5), 8d11e05f8 (dev), 62f83ac45 (6.5), ea4501366 (tqtc/lts-6.2), 32a56ba8f (dev), e801fced5 (6.7), 8473329c2 (6.6), 97fd6ce85 (tqtc/lts-6.5), 5af836aea (dev), 1a1b7cb71 (6.8)
Description
registerInputDevice() is called from QWaylandInputDevice::seat_capabilities(uint32_t caps) ; in that context we have so far not been able to get enough information about the device capabilities etc. The seat capabilities don't include very many flags:
enum wl_seat_capability {
/**
* the seat has pointer devices
*/
WL_SEAT_CAPABILITY_POINTER = 1,
/**
* the seat has one or more keyboards
*/
WL_SEAT_CAPABILITY_KEYBOARD = 2,
/**
* the seat has touch devices
*/
WL_SEAT_CAPABILITY_TOUCH = 4,
};
I left a TODO comment in https://codereview.qt-project.org/c/qt/qtwayland/+/301231 about this, but I still don't understand if there's anything in wayland protocol that lets us distinguish individual devices and their capabilities. I think surely such a feature must be in demand, not only from us.
WheelHandler's ctor has
setAcceptedDevices(QInputDevice::DeviceType::Mouse);
so since QWaylandInputDevice::seat_capabilities() assumes that it's a touchpad (because if you have a laptop touchpad, you want to be able to use native gestures), you often have to override WheelHandler's acceptedDevices to PointerDevice.Mouse | PointerDevice.TouchPad in order to get it to react. This is really not ideal.
Furthermore, we'd like QInputDevice::devices() to provide as complete a list as possible.
Wayland at this point is behaving just as badly as macOS: we can't get the devices; perhaps we could see at runtime that touchpad-like events are happening, but I hope we can eventually do better than that, even if it depends on some Wayland extension that is not yet written.
Attachments
Issue Links
- depends on
-
QTBUG-96258 Support wl_seat v6
- Closed
-
QTBUG-115207 Properly register the input devices on Wayland
- Reported
- relates to
-
QTBUG-78839 Map touchscreen input device to specific display
- Reported
-
QTBUG-113711 Windows: QInputDevice::devices() returns empty list
- Reported
-
QTBUG-63363 QPointingDevices for the trackpad and mouse are dynamically instantiated on macOS
- Reported
-
QTBUG-87646 WheelHandler doesn't work correctly with TouchPad
- Closed
- resulted from
-
QTBUG-72167 Add a device tree
- Closed
- resulted in
-
QTBUG-112394 Minimal map example - WheelHandler not working
- Closed