Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.12.4, 5.13.0
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