aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-08-15 11:01:13 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-15 22:31:32 +0000
commitb34665b72a1eba757a4db39c8b7e31fb8736410c (patch)
tree5b30d2ebea4e5c8436b383c2e2dbec97a0384971 /src
parent7de5659aaca239ca397e1596c76e9130f7f247a6 (diff)
Don't compress touch events in subscene DeliveryAgents
flushFrameSynchronousEvents() is only called on the window's DA, so a touch event stored in QQuickDeliveryAgentPrivate::delayedTouch in a subscene DA would be lost, unless we make the flush recursive. However, a grabbed touchpoint remembers its DA; when that's a subscene agent, subsequent touch moves are delivered directly via the subscene DA, and touch event compression does not occur at all. This may pessimize performance if touch events occur many times more often than frame rendering, but it's not expected to matter a lot on 3D-capable hardware. Fixes: QTBUG-105566 Change-Id: I9102b20806f9577fba0f741f7589ee5b1642e5a5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 212f31f9eaa0e2ba569ae1458fd0f0dca3c53e60) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/quick/util/qquickdeliveryagent.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/util/qquickdeliveryagent.cpp b/src/quick/util/qquickdeliveryagent.cpp
index 002a712381..c339bccf21 100644
--- a/src/quick/util/qquickdeliveryagent.cpp
+++ b/src/quick/util/qquickdeliveryagent.cpp
@@ -1414,6 +1414,11 @@ QQuickPointingDeviceExtra *QQuickDeliveryAgentPrivate::deviceExtra(const QInputD
*/
bool QQuickDeliveryAgentPrivate::compressTouchEvent(QTouchEvent *event)
{
+ // If this is a subscene agent, don't store any events, because
+ // flushFrameSynchronousEvents() is only called on the window's DA.
+ if (isSubsceneAgent)
+ return false;
+
QEventPoint::States states = event->touchPointStates();
if (states.testFlag(QEventPoint::State::Pressed) || states.testFlag(QEventPoint::State::Released)) {
qCDebug(lcTouchCmprs) << "no compression" << event;