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

Gestures are not taking masks into account

    XMLWordPrintable

Details

    • Linux/Wayland

    Description

      Please run the modified imagegestures example and try to make a gesture (pinch, swipe etc.) outside of the clock.
      Expected behavior:
      The image widget rects to it.
      Current behavior:
      The clock widget is not letting the gesture through.
      Possible reason:
      When a gesture was recognized and a GestureStarted event should be sent the QGestureManager has to determine the target widget that will receive the gesture event. If the gesture has a hot spot the QGestureManager looks for the target via QApplication::topLevelAt(), which delegates to the QPlatformScreen::topLevelAt implementation.

      Unfortunately, the QPlatformScreen::topLevelAt() implementation on Wayland just delegates to the client-site managed list of windows, which does not respect masks or other window manager attributes (such as z-ordering rules) that were set to top level widgets. So even top level widgets that are "transparent" at the hot spot will receive the gesture event.

      https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/kernel/qgesturemanager.cpp#n661

      Attachments

        Activity

          People

            nicolauz Thomas Senyk
            karimpinter Karim Pinter (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: