mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 20:30:27 +01:00
fallback: Add IBM/Lenovo Scrollpoint mice quirk to enable smooth scrolling.
Instead of a scroll wheel these mice feature trackpoint-like sticks which generate a huge amount of scroll events that need to be handled differently than scroll wheel events. Signed-off-by: Peter Ganzhorn <peter.ganzhorn@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
74e20e0ae0
commit
4cc2b952a2
4 changed files with 32 additions and 0 deletions
|
|
@ -211,6 +211,21 @@ fallback_flush_wheels(struct fallback_dispatch *dispatch,
|
|||
if (!(device->seat_caps & EVDEV_DEVICE_POINTER))
|
||||
return;
|
||||
|
||||
if (device->model_flags & EVDEV_MODEL_LENOVO_SCROLLPOINT) {
|
||||
struct normalized_coords unaccel = { 0.0, 0.0 };
|
||||
|
||||
dispatch->wheel.y *= -1;
|
||||
normalize_delta(device, &dispatch->wheel, &unaccel);
|
||||
evdev_post_scroll(device,
|
||||
time,
|
||||
LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS,
|
||||
&unaccel);
|
||||
dispatch->wheel.x = 0;
|
||||
dispatch->wheel.y = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (dispatch->wheel.y != 0) {
|
||||
wheel_degrees.y = -1 * dispatch->wheel.y *
|
||||
device->scroll.wheel_click_angle.y;
|
||||
|
|
|
|||
|
|
@ -1286,6 +1286,7 @@ evdev_read_model_flags(struct evdev_device *device)
|
|||
MODEL(TABLET_NO_TILT),
|
||||
MODEL(TABLET_MODE_NO_SUSPEND),
|
||||
MODEL(LENOVO_CARBON_X1_6TH),
|
||||
MODEL(LENOVO_SCROLLPOINT),
|
||||
#undef MODEL
|
||||
{ "ID_INPUT_TRACKBALL", EVDEV_MODEL_TRACKBALL },
|
||||
{ NULL, EVDEV_MODEL_DEFAULT },
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ enum evdev_device_model {
|
|||
EVDEV_MODEL_MS_NANO_TRANSCEIVER = (1 << 28),
|
||||
EVDEV_MODEL_TABLET_NO_TILT = (1 << 29),
|
||||
EVDEV_MODEL_TABLET_MODE_NO_SUSPEND = (1 << 30),
|
||||
EVDEV_MODEL_LENOVO_SCROLLPOINT = (1 << 31),
|
||||
};
|
||||
|
||||
enum evdev_button_scroll_state {
|
||||
|
|
|
|||
|
|
@ -189,6 +189,21 @@ libinput:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnHP:pnHPZBookStudioG3:*
|
|||
libinput:tablet:input:b0003v256Cp*
|
||||
LIBINPUT_MODEL_TABLET_NO_PROXIMITY_OUT=1
|
||||
|
||||
##########################################
|
||||
# IBM
|
||||
##########################################
|
||||
#
|
||||
# IBM/Lenovo Scrollpoint mouse. Instead of a scroll wheel these mice
|
||||
# feature trackpoint-like sticks which generate a huge amount of scroll
|
||||
# events that need to be handled differently than scroll wheel events
|
||||
libinput:mouse:b0003v04B3p3100*
|
||||
libinput:mouse:b0003v04B3p3103*
|
||||
libinput:mouse:b0003v04B3p3105*
|
||||
libinput:mouse:b0003v04B3p3108*
|
||||
libinput:mouse:b0003v04B3p3109*
|
||||
libinput:mouse:b0003v17EFp6049*
|
||||
LIBINPUT_MODEL_LENOVO_SCROLLPOINT=1
|
||||
|
||||
##########################################
|
||||
# LENOVO
|
||||
##########################################
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue