LIBINPUT_SWITCH_STATE_OFF;
}
-void
-fallback_normalize_delta(struct evdev_device *device,
- const struct device_coords *delta,
- struct normalized_coords *normalized)
-{
- normalized->x = delta->x * DEFAULT_MOUSE_DPI / (double)device->dpi;
- normalized->y = delta->y * DEFAULT_MOUSE_DPI / (double)device->dpi;
-}
-
static inline bool
post_button_scroll(struct evdev_device *device,
struct device_float_coords raw,
uint64_t time,
int button,
enum libinput_button_state state);
-void
-fallback_normalize_delta(struct evdev_device *device,
- const struct device_coords *delta,
- struct normalized_coords *normalized);
void
fallback_init_wheel(struct fallback_dispatch *dispatch,
* trackstick data via REL_WHEEL. Normalize it like normal x/y coordinates.
*/
if (device->model_flags & EVDEV_MODEL_LENOVO_SCROLLPOINT) {
- struct normalized_coords unaccel = { 0.0, 0.0 };
-
- dispatch->wheel.lo_res.y *= -1;
- fallback_normalize_delta(device, &dispatch->wheel.lo_res, &unaccel);
+ const struct device_float_coords raw = {
+ .x = dispatch->wheel.lo_res.x,
+ .y = dispatch->wheel.lo_res.y * -1,
+ };
+ const struct normalized_coords normalized =
+ filter_dispatch_constant(device->pointer.filter,
+ &raw,
+ device,
+ time);
evdev_post_scroll(device,
time,
LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS,
- &unaccel);
+ &normalized);
dispatch->wheel.hi_res.x = 0;
dispatch->wheel.hi_res.y = 0;
dispatch->wheel.lo_res.x = 0;