summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@qt.io>2016-08-23 10:44:20 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-10-07 04:44:41 +0000
commitcd26e66c2e8ddde06b5e22ef28d815ac1082a7c4 (patch)
treeeb17a3206d5a00e70aef8d96bc3b2cde0234a407 /src/gui/kernel/qguiapplication.cpp
parente6d0d202f3c3f296b6865a63d87a7c9182b63ae2 (diff)
Combine device and point id into 32 bit point idwip/remac
This allows us to not have conflicts between the point ids between different devices for QtQuick pointer handlers. We do this in QtGui because we can then safely compare point ids from QTouchEvent::TouchPoint and QQuickEventPoint. (Point ids that QtQuick pointer handlers use will be based on the point ids provided by QTouchEvent::TouchPoint::id) Change-Id: I8b9ab0d44224b15175b820d33cbb2d8bd21e99f2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index d8457bc041..76386a30a0 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -84,6 +84,7 @@
#include "private/qcursor_p.h"
#include "private/qopenglcontext_p.h"
#include "private/qinputdevicemanager_p.h"
+#include "private/qtouchdevice_p.h"
#include "private/qdnd_p.h"
#include <qpa/qplatformthemefactory_p.h>
@@ -1944,7 +1945,8 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
points << point;
QEvent::Type type;
- QList<QTouchEvent::TouchPoint> touchPoints = QWindowSystemInterfacePrivate::fromNativeTouchPoints(points, window, &type);
+ QList<QTouchEvent::TouchPoint> touchPoints =
+ QWindowSystemInterfacePrivate::fromNativeTouchPoints(points, window, QTouchDevicePrivate::get(m_fakeTouchDevice)->id, &type);
QWindowSystemInterfacePrivate::TouchEvent fake(window, e->timestamp, type, m_fakeTouchDevice, touchPoints, e->modifiers);
fake.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;