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

Remove obsolete QWSI::handleTabletEnterProximityEvent and handleTabletLeaveProximityEvent

    XMLWordPrintable

Details

    Description

      We have

          static bool handleTabletEnterLeaveProximityEvent(QWindow *window, ulong timestamp, const QPointingDevice *device,
                                                           bool inProximity, const QPointF &local = QPointF(), const QPointF &global = QPointF(),
                                                           Qt::MouseButtons buttons = {}, int xTilt = 0, int yTilt = 0,
                                                           qreal tangentialPressure = 0, qreal rotation = 0, int z = 0,
                                                           Qt::KeyboardModifiers modifiers = Qt::NoModifier);
          static bool handleTabletEnterLeaveProximityEvent(QWindow *window, const QPointingDevice *device,
                                                           bool inProximity, const QPointF &local = QPointF(), const QPointF &global = QPointF(),
                                                           Qt::MouseButtons buttons = {}, int xTilt = 0, int yTilt = 0,
                                                           qreal tangentialPressure = 0, qreal rotation = 0, int z = 0,
                                                           Qt::KeyboardModifiers modifiers = Qt::NoModifier);
          static bool handleTabletEnterProximityEvent(ulong timestamp, int deviceType, int pointerType, qint64 uid);
          static void handleTabletEnterProximityEvent(int deviceType, int pointerType, qint64 uid);
          static bool handleTabletLeaveProximityEvent(ulong timestamp, int deviceType, int pointerType, qint64 uid);
          static void handleTabletLeaveProximityEvent(int deviceType, int pointerType, qint64 uid);
      

      The first two are better because they take the QPointingDevice*, whereas the last 4 are trying to look up the stylus by its IDs, which can lead to bugs like QTBUG-104878.
      After fixing xcb, we have only src/platformsupport/input/evdevtablet/qevdevtablethandler.cpp using the old functions. Each platform plugin, including the evdev plugin, needs to take responsibility for creating and owning the QPointingDevice instances. Then we can delete these last 4 functions to ensure that nobody will make the same mistake when implementing new platforms.

      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:

                Gerrit Reviews

                  There are no open Gerrit changes