diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev-mt-touchpad.c | 4 | ||||
-rw-r--r-- | src/filter.c | 6 | ||||
-rw-r--r-- | src/filter.h | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 2d39e18..6af594d 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -2056,8 +2056,10 @@ tp_init_accel(struct tp_dispatch *tp) if (tp->device->model_flags & EVDEV_MODEL_LENOVO_X230 || tp->device->model_flags & EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81) filter = create_pointer_accelerator_filter_lenovo_x230(tp->device->dpi); + else if (libevdev_get_id_bustype(device->evdev) == BUS_BLUETOOTH) + filter = create_pointer_accelerator_filter_touchpad(device->dpi, ms2us(50), ms2us(10)); else - filter = create_pointer_accelerator_filter_touchpad(tp->device->dpi); + filter = create_pointer_accelerator_filter_touchpad(device->dpi, 0, 0); if (!filter) return false; diff --git a/src/filter.c b/src/filter.c index 49d324e..faf8d31 100644 --- a/src/filter.c +++ b/src/filter.c @@ -1028,7 +1028,9 @@ struct motion_filter_interface accelerator_interface_touchpad = { }; struct motion_filter * -create_pointer_accelerator_filter_touchpad(int dpi) +create_pointer_accelerator_filter_touchpad(int dpi, + uint64_t event_delta_smooth_threshold, + uint64_t event_delta_smooth_value) { struct pointer_accelerator *filter; @@ -1038,6 +1040,8 @@ create_pointer_accelerator_filter_touchpad(int dpi) filter->base.interface = &accelerator_interface_touchpad; filter->profile = touchpad_accel_profile_linear; + filter->event_delta_smooth_threshold = event_delta_smooth_threshold; + filter->event_delta_smooth_value = event_delta_smooth_value; return &filter->base; } diff --git a/src/filter.h b/src/filter.h index e24c20d..131f801 100644 --- a/src/filter.h +++ b/src/filter.h @@ -114,7 +114,9 @@ struct motion_filter * create_pointer_accelerator_filter_linear_low_dpi(int dpi); struct motion_filter * -create_pointer_accelerator_filter_touchpad(int dpi); +create_pointer_accelerator_filter_touchpad(int dpi, + uint64_t event_delta_smooth_threshold, + uint64_t event_delta_smooth_value); struct motion_filter * create_pointer_accelerator_filter_lenovo_x230(int dpi); |