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

Multiple tablet input devices with different sizes generate incorrect high res coordinates on X11

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 4.7.4, 4.8.0, 4.8.1, 4.8.2
    • None

    Description

      On X11 if you have multiple tablet input devices, like a Wacom Cintiq and a Wacom Intuos tablet connected at the same time, one of the tablets will generate incorrect high resolution coordinates. The other tablet gets the right values for its high resolution coordinates.

      I've looked into this some, so here are some technical details.

      The reason seems to be that when translating the XEvent in qapplication_X11.cpp the code searches for the first tablet device it finds that supports the type of the current event. Since both tablets will support this event type, we wind up always finding only one of the tablets. Specifically, the first tablet that was found when enumerating tablets during qt_init. Then all calls to QTabletDeviceData::scaleCoord are made on the same device, so the size of one of the devices is never used. That device will wind up with incorrect high resolution coordinates.

      This can be avoided by looking at the deviceid in the XEvent and finding the corresponding tablet device. I have a change that does that which works for me locally.

      I listed 4.7.4 and forward as the "Affects Versions" because I found this issue in 4.7.4 and the code doesn't seem to have changed in newer versions. From the git history it looks like this issue has existed since at least qt 4.5 (which is as far back as the git history went for this file).

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            ryans Ryan Stelzleni
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes