wasm: fix touch -> mouse event synth on Safari
Mobile Safari generates touch pointer events with negative pointer id's, which causes processTochEvent() to skip the event instead of synthesizing a mouse event. Ensure that the id's are always positive by taking the absolute value of the event. Pick-to: 6.6 6.5 Change-Id: I1514329dc76ecc4b9103f7deca9642aaf304df8b Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
parent
2dcc30592b
commit
7a31911b79
@ -106,7 +106,10 @@ bool ClientArea::deliverEvent(const PointerEvent &event)
|
||||
.insert(event.pointerId, QWindowSystemInterface::TouchPoint())
|
||||
.value();
|
||||
|
||||
touchPoint->id = event.pointerId;
|
||||
// Assign touch point id. TouchPoint::id is int, but QGuiApplicationPrivate::processTouchEvent()
|
||||
// will not synthesize mouse events for touch points with negative id; use the absolute value for
|
||||
// the touch point id.
|
||||
touchPoint->id = qAbs(event.pointerId);
|
||||
|
||||
touchPoint->state = QEventPoint::State::Pressed;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user