diff options
| author | nyx <nnyyxxxx@protonmail.com> | 2025-03-03 15:56:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-03 21:56:01 +0100 |
| commit | d7e7a292613a4f20218074ff8299dff099a80098 (patch) | |
| tree | cf57d20dfa11d2502115699a7bb36250c813adfc /src/devices/VirtualPointer.cpp | |
| parent | f1ef724a87b29a7937cfc328e0c7ea9445a90050 (diff) | |
input: add flip_x and flip_y for touchpad (#9481)
Diffstat (limited to 'src/devices/VirtualPointer.cpp')
| -rw-r--r-- | src/devices/VirtualPointer.cpp | 6 |
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); |
