aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickdeliveryagent.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-04-27 18:04:37 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-04-28 08:09:21 +0200
commit73148c79a328cb834a51de5c152f32851194ce52 (patch)
treef68950f8180ac94be6cfadfe39c544c573252513 /src/quick/util/qquickdeliveryagent.cpp
parent15e1987047aea2a9be4e2c5dcb6c46233abc55fc (diff)
QQuickDeliveryAgent::event(): handle tablet events explicitly
QQuickWindow::event() forwards all input events to the DA. If it's not handled there, it eventually gets handled at the bottom by forwarding to QWindow::event() which then dispatches to QQuickWindow::tabletEvent() and from there to da->deliverPointerEvent(); however the switch in QWindow::event() is not meant to be the normal entry point for input events anymore. In a subsequent patch we will move the failsafe "never allow any kind of grab to persist after release" into QQuickWindow::event(), before that is reached; that in turn breaks tst_PointHandler::tabletStylus(), showing that the point is ungrabbed on release before PointHandler handles it and has a chance to emit pointChanged. So we must handle tablet events earlier, alongside mouse and touch events. Amends 68c103225f4e8bd6c1b18ef547108fd60f398c0f. Pick-to: 6.1 Change-Id: Id7508e4bbbdbfe88d002d298c15ec727040f02ef Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/util/qquickdeliveryagent.cpp')
-rw-r--r--src/quick/util/qquickdeliveryagent.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/util/qquickdeliveryagent.cpp b/src/quick/util/qquickdeliveryagent.cpp
index 45a7afda47..6f763342c1 100644
--- a/src/quick/util/qquickdeliveryagent.cpp
+++ b/src/quick/util/qquickdeliveryagent.cpp
@@ -796,6 +796,13 @@ bool QQuickDeliveryAgent::event(QEvent *ev)
break;
}
#endif
+#if QT_CONFIG(tabletevent)
+ case QEvent::TabletPress:
+ case QEvent::TabletMove:
+ case QEvent::TabletRelease:
+ d->deliverPointerEvent(static_cast<QPointerEvent *>(ev));
+ break;
+#endif
default:
return false;
}