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

Wrong widget receives TouchUpdate event on MacOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.7
    • None
    • macOS

    Description

      On MacOS QTouchEvents from `TouchPad` behave inconsistently compared to `TouchScreen` events. If we have a window which accepts touch events and it has a child widget (it doesn't matter if it accepts touch events). Then when doing the propagation, the parent window successfully receives the `TouchBegin`, which it accepts, but the subsequent `TouchUpdate/End` are not received by the window, but by the child widget. This is possibly due to: https://github.com/qt/qtbase/blob/dev/src/widgets/kernel/qapplication.cpp#L3843-L3846, disallowing the event propagation mechanism from setting the target in `activateImplicitTouchGrab`.

      To reword the bug above, if we have two nested widgets and if it is the parent which calls an `accept()` on the event, despite that the event is still sent to child when using TouchPad on MacOS.

      To rephrase the bug description above: if we have two nested widgets, and the parent widget calls `accept()` on the event, the update/end event is still sent to the child widget when using a TouchPad on MacOS.

      I've attached a demo, if you hover the cursor over the push button and try doing a pinch gesture, the event filter isn't called in the parent. I've tried overriding the widget and calling `event->ignore()` – but to no avail (it may take a couple of tries, and Focus in and out for the bug to trigger).

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              shzli SZ LI
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes