Commit 49b58311 authored by Peter Hutterer's avatar Peter Hutterer

evdev: log the wheel click angle setting

Log if we use a non-default click angle setting, makes it easier to debug
this. The condition to add the log was a bit unwieldly to read, so this also
factors out the property names to temporary variables.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
parent 5fd8c7cd
Pipeline #7042 passed with stages
in 8 minutes and 21 seconds
......@@ -1144,21 +1144,23 @@ static inline struct wheel_angle
evdev_read_wheel_click_props(struct evdev_device *device)
struct wheel_angle angles;
const char *wheel_count = "MOUSE_WHEEL_CLICK_COUNT";
const char *wheel_angle = "MOUSE_WHEEL_CLICK_ANGLE";
const char *hwheel_count = "MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL";
const char *hwheel_angle = "MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL";
if (!evdev_read_wheel_click_count_prop(device,
if (!evdev_read_wheel_click_count_prop(device,
&angles.x)) {
if (!evdev_read_wheel_click_prop(device,
angles.x = angles.y;
if (evdev_read_wheel_click_count_prop(device, wheel_count, &angles.y) ||
evdev_read_wheel_click_prop(device, wheel_angle, &angles.y)) {
"wheel: vert click angle: %.2f\n", angles.y);
if (evdev_read_wheel_click_count_prop(device, hwheel_count, &angles.x) ||
evdev_read_wheel_click_prop(device, hwheel_angle, &angles.x)) {
"wheel: horizontal click angle: %.2f\n", angles.y);
} else {
angles.x = angles.y;
return angles;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment