diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c index 196383d0..fa01faa4 100644 --- a/src/evdev-fallback.c +++ b/src/evdev-fallback.c @@ -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; diff --git a/src/evdev.c b/src/evdev.c index 95351082..2a36ef81 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -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 }, diff --git a/src/evdev.h b/src/evdev.h index d1290610..42d71a05 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -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 { diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb index 9dcb38e3..841debe5 100644 --- a/udev/90-libinput-model-quirks.hwdb +++ b/udev/90-libinput-model-quirks.hwdb @@ -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 ##########################################