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

Wayland: Gestures are not delivered to correct top level widget

    XMLWordPrintable

Details

    • Linux/Wayland
    • f7a2d5233 (dev), ae380d343 (dev), 10c3dd87d (dev), 98d1534df (6.7), 1353b9cf3 (6.7), e0ee9cfe3 (6.7), 12cc65053 (tqtc/lts-6.5), 87b6157b9 (tqtc/lts-6.5)

    Description

      When a client application with two or more top level widgets is run in a Wayland compositor the gesture events are not delivered to the correct top level widget.

      QGestureManager::deliverEvents() uses the gesture's hotspot to find the top-level widget. It looks like the Wayland windows contain the same coordinates, so it is picking what it thinks is the top-level widget. If the QGestureManager::deliverEvents() is forced to use the gesture's context from m_gestureOwners, instead of the hotspot, the gesture is sent to the correct window.

      To reproduce, please run the attached example which consists of the compositor and the client. Use mouse and touch screen to click the both top level widgets.

      The QApplication::topLevelAt() with the global mouse event position for mousePressEvent() logging always shows "topLevelAtWidget=Right" even when clicking on the "Left" widget. When tapped with a touch screen the tap gesture is always showing "objectName=Right".

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-113404
          # Subject Branch Project Status CR V

          Activity

            People

              liaqi Liang Qi
              tuomas.vaarala Tuomas Vaarala
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: