aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r--src/quick/items/qquickwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index ff4a357641..67069c7d15 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -2117,8 +2117,10 @@ QQuickPointerEvent *QQuickWindowPrivate::pointerEventInstance(QQuickPointerDevic
{
// the list of devices should be very small so a linear search should be ok
for (QQuickPointerEvent *e: pointerEventInstances) {
- if (e->device() == device)
+ if (e->device() == device) {
+ device->m_event = e;
return e;
+ }
}
QQuickPointerEvent *ev = nullptr;
@@ -2136,6 +2138,7 @@ QQuickPointerEvent *QQuickWindowPrivate::pointerEventInstance(QQuickPointerDevic
break;
}
pointerEventInstances << ev;
+ device->m_event = ev;
return ev;
}