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
-
QTBUG-130300 Mac: No way to distinguish touch pads from regular mice that support pixel scrolling
- Reported
- resulted from
-
QTBUG-72167 Add a device tree
- Closed
- resulted in
-
QTBUG-112394 Minimal map example - WheelHandler not working
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-112432 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
469859,3 | Allow zoom/pan/tilt with mouse on Wayland | dev | qt/qtlocation | Status: MERGED | +2 | 0 |
471231,2 | Allow zoom/pan/tilt with mouse on Wayland | 6.5 | qt/qtlocation | Status: MERGED | +2 | 0 |
479017,2 | doc: Reduce expectations for QInputDevice::devices() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
479269,2 | doc: Reduce expectations for QInputDevice::devices() | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
479271,2 | doc: Reduce expectations for QInputDevice::devices() | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
490896,11 | Client: Register QPointingDevices for graphics tablet devices | dev | qt/qtwayland | Status: MERGED | +2 | +1 |
540991,4 | Accept mouse or touchpad in snippets with acceptedDevices | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
542028,2 | Accept mouse or touchpad in snippets with acceptedDevices | 6.7 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
542517,2 | Accept mouse or touchpad in snippets with acceptedDevices | 6.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
542569,2 | Accept mouse or touchpad in snippets with acceptedDevices | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |
588129,2 | Client: Register QPointingDevices for graphics tablet devices | 6.8 | qt/qtwayland | Status: MERGED | +2 | 0 |