summaryrefslogtreecommitdiff
path: root/src/devices/VirtualPointer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/VirtualPointer.cpp')
-rw-r--r--src/devices/VirtualPointer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/devices/VirtualPointer.cpp b/src/devices/VirtualPointer.cpp
index 7cfb0631..e98acd04 100644
--- a/src/devices/VirtualPointer.cpp
+++ b/src/devices/VirtualPointer.cpp
@@ -19,7 +19,11 @@ CVirtualPointer::CVirtualPointer(SP<CVirtualPointerV1Resource> resource) : point
events.destroy.emit();
});
- listeners.motion = pointer->events.move.registerListener([this](std::any d) { pointerEvents.motion.emit(d); });
+ listeners.motion = pointer->events.move.registerListener([this](std::any d) {
+ auto E = std::any_cast<SMotionEvent>(d);
+ E.device = self.lock();
+ pointerEvents.motion.emit(E);
+ });
listeners.motionAbsolute = pointer->events.warp.registerListener([this](std::any d) {
// we need to unpack the event and add our device here because it's required to calculate the position correctly
auto E = std::any_cast<SMotionAbsoluteEvent>(d);