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

XCB: Mouse events will not be compressed when tablet events are present in certain configurations.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.11.1
    • 5.6.1, 5.10.1
    • QPA: X11/XCB
    • None

    Description

      In QXcbConnection::compressEvent, if an XI_Motion event is from a tablet device it will not be compressed. The code casts an xcb_generic_event_t to xXIDeviceEvent to access the sourceid field.  

              // compress XI_Motion, but not from tablet devices
              if (isXIType(event, m_xiOpCode, XI_Motion)) {
      #ifndef QT_NO_TABLETEVENT
                  xXIDeviceEvent *xdev = reinterpret_cast<xXIDeviceEvent *>(event);
                  if (const_cast<QXcbConnection *>(this)->tabletDataForDevice(xdev->sourceid))
                      return false;
              ....

       

      // it is safe to cast XI_* events here as long as we are only touching the first 32 bytes,
      // after that position event needs memmove, see xi2PrepareXIGenericDeviceEvent

      The sourceid field is past the first 32 bytes, so it will be reading the wrong data.

      If there is a tablet device with an id that matches this data, the event will not be compressed even if its from a mouse device which can cause reduced performance in the application.

      Attachments

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

        Activity

          People

            paeglis Gatis Paeglis
            ianj Ian Jones
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes