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

Wacom proximity events went missing on X11 in 6.3

    XMLWordPrintable

Details

    • 8824a4e19c (qt/qtbase/dev) 8824a4e19c (qt/tqtc-qtbase/dev) 90070aaef3 (qt/qtbase/6.3) 90070aaef3 (qt/tqtc-qtbase/6.3) 58df309425 (qt/qtbase/6.4) 58df309425 (qt/tqtc-qtbase/6.4)

    Description

      Can be demonstrated with qtbase/tests/manual/qtabletevent/device_information , or with any application if you have enabled the qt.qpa.input.events logging category. Then when you bring a stylus near the top surface of the tablet (but not necessarily touching) you should get log output like this:

      [     2.531 D] qt.qpa.input.devices QXcbConnection::xi2HandleTabletEvent - XI2 proximity change on tablet 23 Wacom Intuos3 6x8 Pen stylus (USB b1): last tool: 12c00001 id 885 current tool: 12c00001 id 885 Stylus
      

      When the bug is fixed, the stack should look like this:

      1  QXcbConnection::xi2HandleTabletEvent   qxcbconnection_xi2.cpp    1524 0x7ffff21d1a92 
      2  QXcbConnection::xi2HandleEvent         qxcbconnection_xi2.cpp    728  0x7ffff21cc8b1 
      3  QXcbConnection::handleXcbEvent         qxcbconnection.cpp        699  0x7ffff21af580 
      4  QXcbConnection::processXcbEvents       qxcbconnection.cpp        1061 0x7ffff21b08d4 
      5  xcbSourceDispatch                      qxcbeventdispatcher.cpp   55   0x7ffff21ec8a6 
      6  g_main_context_dispatch                                               0x7ffff5592c6b 
      7  ??                                                                    0x7ffff55e9001 
      8  g_main_context_iteration                                              0x7ffff5590392 
      9  QEventDispatcherGlib::processEvents    qeventdispatcher_glib.cpp 393  0x7ffff63c5c90 
      10 QXcbGlibEventDispatcher::processEvents qxcbeventdispatcher.cpp   96   0x7ffff21ecafa 
      11 QEventLoop::processEvents              qeventloop.cpp            100  0x7ffff5fdc293 
      12 QEventLoop::exec                       qeventloop.cpp            182  0x7ffff5fdc5fe 
      13 QCoreApplication::exec                 qcoreapplication.cpp      1347 0x7ffff5fc9497 
      14 QGuiApplication::exec                  qguiapplication.cpp       1860 0x7ffff69278d6 
      15 QApplication::exec                     qapplication.cpp          2586 0x7ffff75eef33 
      16 main                                   main.cpp                  21   0x55555555892c 
      

      It got broken in https://codereview.qt-project.org/c/qt/qtbase/+/343520, so it can be fixed by avoiding the early returns in xi2HandleEvent() when event_type == XCB_INPUT_PROPERTY:

      void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
      {
          auto *xiEvent = reinterpret_cast<qt_xcb_input_device_event_t *>(event);
          setTime(xiEvent->time);
          if (m_xiSlavePointerIds.contains(xiEvent->deviceid) && xiEvent->event_type != XCB_INPUT_PROPERTY) {
              if (!m_duringSystemMoveResize)
                  return;
              if (xiEvent->event == XCB_NONE)
                  return;
      
              if (xiEvent->event_type == XCB_INPUT_BUTTON_RELEASE
                  && xiEvent->detail == XCB_BUTTON_INDEX_1 ) {
                  abortSystemMoveResize(xiEvent->event);
              } else if (xiEvent->event_type == XCB_INPUT_TOUCH_END) {
                  abortSystemMoveResize(xiEvent->event);
                  return;
              } else {
                  return;
              }
          }
      ...
      

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes