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.7 6.5 6.2 5.15 Change-Id: Id60b8b77a1843344db4d4e4c13382ad87adac806 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
d935a89d25
commit
10c3dd87d3
@ -610,7 +610,8 @@ void QGestureManager::deliverEvents(const QSet<QGesture *> &gestures,
|
|||||||
QWidget *child = topLevel->childAt(topLevel->mapFromGlobal(pt));
|
QWidget *child = topLevel->childAt(topLevel->mapFromGlobal(pt));
|
||||||
target = child ? child : topLevel;
|
target = child ? child : topLevel;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
if (!target) {
|
||||||
// or use the context of the gesture
|
// or use the context of the gesture
|
||||||
QObject *context = m_gestureOwners.value(gesture, 0);
|
QObject *context = m_gestureOwners.value(gesture, 0);
|
||||||
if (context->isWidgetType())
|
if (context->isWidgetType())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user