input: add flip_x and flip_y for touchpad (#9481)
This commit is contained in:
parent
f1ef724a87
commit
d7e7a29261
7 changed files with 50 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue