aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
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 23:16:32 +0000
commit53086c228c94bf37d4a01e804643a5ff06f51b04 (patch)
treea3c599c5df6aa7288da065a657043eafb4544ce2 /src/quick
parent3c44edbc9ea2d9b6d3fbe85d967f1a6a44dbb4bb (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/quick')
-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 0a7843c5c1..12fa31d3b7 100644
--- a/src/quick/util/qquickdeliveryagent.cpp
+++ b/src/quick/util/qquickdeliveryagent.cpp
@@ -1409,6 +1409,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;