mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
virtual_pointer: fix multiplier for axis_discrete (#2684)
The virtual-pointer protocol accepts discrete scroll events, not axis-value120. Therefore the value received from a client must be multiplied by 120 before being handed to mutate_axis_frame. https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/879243e370de6167d2c49510396f937b1a93fab5/types/wlr_virtual_pointer_v1.c#L183 https://github.com/feschber/lan-mouse/issues/318 https://github.com/feschber/lan-mouse/pull/325 https://github.com/feschber/lan-mouse/issues/329
This commit is contained in:
committed by
GitHub
parent
aecbd679e3
commit
08fbdef60e
@@ -519,7 +519,7 @@ where
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
pointer.mutate_axis_frame(Some(time), |frame| {
|
pointer.mutate_axis_frame(Some(time), |frame| {
|
||||||
frame.value(axis, value).v120(axis, discrete)
|
frame.value(axis, value).v120(axis, discrete * 120)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
zwlr_virtual_pointer_v1::Request::Destroy => {}
|
zwlr_virtual_pointer_v1::Request::Destroy => {}
|
||||||
|
|||||||
Reference in New Issue
Block a user