diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-01-20 14:13:44 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-01-20 17:00:34 +0100 |
commit | a738c3566790c6e9abeea3c4c3dacfceaa82f66a (patch) | |
tree | 8efb2295136564a6741d6130693ea160f578f237 /src/quick/items/qquickwindow.cpp | |
parent | 3230caeeb5fab2035fea9242aaca4022f9ad25e4 (diff) |
Ensure we cancel touchMouseSynthesis upon receiving touchCancel
As it stood, we wouldn't cancel touchMouseSynthesis after
receiving a touch cancel event. The result would be that
the first touch event sent to QQuickWindow thereafter would
have touchMouseId set to value different from -1. This
again would fool QQuickWindow into believing that the
event belonged to a touch event it has synthesized
before, and it would as such take a different/wrong path
for delivery.
This caused text selection to fail on iOS, since a
press-and-hold on a line edit from QPA would cancel
the touch event and show a magnifier glass. When the
user later touched inside the line edit again to
move the cursor, this new touch event would not be
delivered to the text edit.
Pick-to: 6.0
Fixes: QTBUG-90485
Change-Id: Iad640ae57317ea86ee68ca053654b0b30ade003a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 446573aae8..ccacc5d5a6 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2291,7 +2291,7 @@ bool QQuickWindowPrivate::deliverTouchCancelEvent(QTouchEvent *event) // Deliver it to all items and handlers that have active touches. const_cast<QPointingDevicePrivate *>(QPointingDevicePrivate::get(event->pointingDevice()))-> sendTouchCancelEvent(event); - + cancelTouchMouseSynthesis(); return true; } |