Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-100454

N-trig DuoSense touchscreen on X11 is initialized as a scrolling device with maxPoints = 1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.2.3, 6.3.0 Alpha
    • Fix Version/s: None
    • Component/s: QPA: X11/XCB
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      QXcbConnection::xi2SetupSlavePointerDevice() detects that it has 7 buttons (probably because it's an N-trig DuoSense device that also supports a stylus), so this scrollingDevice() function is called, which is a lambda that creates a QXcbScrollingDevicePrivate, which initializes it with maxPoints 1:

              case XCB_INPUT_DEVICE_CLASS_TYPE_BUTTON: {
                  auto *bci = reinterpret_cast<xcb_input_button_class_t *>(classinfo);
                  xcb_atom_t *labels = nullptr;
                  if (bci->num_buttons >= 5) {
                      labels = xcb_input_button_class_labels(bci);
                      xcb_atom_t label4 = labels[3];
                      xcb_atom_t label5 = labels[4];
                      // Some drivers have no labels on the wheel buttons, some have no label on just one and some have no label on
                      // button 4 and the wrong one on button 5. So we just check that they are not labelled with unrelated buttons.
                      if ((!label4 || qatom(label4) == QXcbAtom::ButtonWheelUp || qatom(label4) == QXcbAtom::ButtonWheelDown) &&
                          (!label5 || qatom(label5) == QXcbAtom::ButtonWheelUp || qatom(label5) == QXcbAtom::ButtonWheelDown))
                          scrollingDevice()->legacyOrientations |= Qt::Vertical;
                  }
      

      This is done before the maximum touch point check for touchscreens (further down in the same function).

      So basically we are using this QXcbScrollingDevicePrivate subclass excessively (and I've noticed that before).

      [     0.004 D] qt.qpa.input.devices QWindowSystemInterface::registerInputDevice - register QPointingDevice("N-trig DuoSense Stylus" Stylus id=9 seat=30002 ptrType=Pen caps=Position|Pressure|MouseEmulation|Hover uniqueId=0)
      [     0.004 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    it's a scrolling device
      [     0.004 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice - input device  "N-trig DuoSense" ID 10
      [     0.004 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has 7 buttons  <------ but it's really a touchscreen
      [     0.004 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Abs MT Position X" recognized? true
      [     0.005 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Abs MT Position Y" recognized? true
      [     0.005 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Rel Horiz Scroll" recognized? true
      [     0.005 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Rel Vert Scroll" recognized? true
      [     0.005 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    it's a scrolling device
      [     0.005 D] qt.qpa.input.devices QXcbConnection::populateTouchDevices -    has touch class with mode 1
      [     0.005 D] qt.qpa.input.devices QXcbConnection::populateTouchDevices - unexpectedly missing RelVert/HorizWheel atoms for touchpad with scroll capability QPointingDevice("N-trig DuoSense" TouchScreen id=a seat=30002 ptrType=Finger caps=Position|NormalizedPosition|Scroll maxPts=10)
      [     0.006 D] qt.qpa.input.devices QWindowSystemInterface::registerInputDevice - register QPointingDevice("N-trig DuoSense" TouchScreen id=a seat=30002 ptrType=Finger caps=Position|NormalizedPosition|Scroll maxPts=10)
      [     0.006 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    it's a touchscreen with type 2 capabilities 0x121 max touch points 10
      [     0.006 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice - input device  "N-trig DuoSense Mouse" ID 11
      [     0.006 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has 7 buttons
      [     0.006 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Rel X" recognized? true
      [     0.006 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Rel Y" recognized? true
      [     0.007 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Rel Horiz Scroll" recognized? true
      [     0.007 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Rel Vert Scroll" recognized? true
      [     0.007 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    it's a scrolling device
      [     0.007 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    it's a mouse
      [     0.007 D] qt.qpa.input.devices QWindowSystemInterface::registerInputDevice - register QPointingDevice("N-trig DuoSense Mouse" Mouse id=b seat=30002 caps=Position|Scroll|Hover)
      [     0.007 D] qt.qpa.input.devices QWindowSystemInterface::registerInputDevice - register QInputDevice("Input Club Infinity_Ergodox/QMK", type=QInputDevice::DeviceType::Keyboard, ID=c, seat='30002')
      [     0.008 D] qt.qpa.input.devices QWindowSystemInterface::registerInputDevice - register QInputDevice("Input Club Infinity_Ergodox/QMK System Control", type=QInputDevice::DeviceType::Keyboard, ID=d, seat='30002')
      [     0.008 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice - input device  "Input Club Infinity_Ergodox/QMK Consumer Control" ID 14
      [     0.008 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has 7 buttons
      [     0.008 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    it's a keyboard
      [     0.008 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Rel X" recognized? true
      [     0.008 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Rel Y" recognized? true
      [     0.008 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "Rel Horiz Wheel" recognized? true
      [     0.009 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    has valuator "" recognized? false
      [     0.009 D] qt.qpa.input.devices QXcbConnection::xi2SetupSlavePointerDevice -    it's a scrolling device
      

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              srutledg Shawn Rutledge
              Reporter:
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes