[libinput] How I get to scroll.wheel_click_angle value using libinput?

강정현 jhyuni.kang at samsung.com
Thu Mar 24 05:53:41 UTC 2016


Hello, guys.

When I check mouse wheel events using libinput,
I found that this wheel value was always converted by libinput.
Like this: wheel_degrees.y = -1 * e->value * device-
>scroll.wheel_click_angle.
In function evdev_process_relative().

That value is set using udev property named "MOUSE_WHEEL_CLICK_ANGLE".
But if that value is not exist, set default
value(DEFAULT_WHEEL_CLICK_ANGLE).

In that case, I move wheel to just one, kernel send wheel event that value
is 1,
and libinput changed it to 15(this is currently default value).

This is my concerned point. I just want to know mouse wheel's real move,
not converted value.
So I found how to get that value(scroll.wheel_click_angle) for revert value
to 1(like via kernel)
But currently libinput_device_config_scroll_* API's doesn't support this.

How can I get this value?
Or how about make a new API like
libinput_device_config_scroll_get_wheel_click_angle()?
If you this make sense, I will upload a commit to add a new API.

Please give me your opinions.
Thanks and regards,
JengHyun Kang.



More information about the wayland-devel mailing list