QGestureManager: use gesture owner target if topLevelAt returns nullptr
For security reason, Wayland doesn't provide global position for top level windows, so topLevelAt is not supported. Fixes: QTBUG-113404 Pick-to: 6.5 6.2 5.15 Change-Id: Id60b8b77a1843344db4d4e4c13382ad87adac806 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 10c3dd87d3bc2e84d4f477888622f5fc7ed5d502) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
b19112dee4
commit
e0ee9cfe31
@ -610,7 +610,8 @@ void QGestureManager::deliverEvents(const QSet<QGesture *> &gestures,
|
||||
QWidget *child = topLevel->childAt(topLevel->mapFromGlobal(pt));
|
||||
target = child ? child : topLevel;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if (!target) {
|
||||
// or use the context of the gesture
|
||||
QObject *context = m_gestureOwners.value(gesture, 0);
|
||||
if (context->isWidgetType())
|
||||
|
Loading…
x
Reference in New Issue
Block a user