#include "filter.h"
#include "libinput-private.h"
-#define DEFAULT_AXIS_STEP_DISTANCE 10
+#define DEFAULT_WHEEL_CLICK_ANGLE 15
#define DEFAULT_MIDDLE_BUTTON_SCROLL_TIMEOUT 200
enum evdev_key_type {
time,
LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL,
LIBINPUT_POINTER_AXIS_SOURCE_WHEEL,
- -1 * e->value * DEFAULT_AXIS_STEP_DISTANCE);
+ -1 * e->value * DEFAULT_WHEEL_CLICK_ANGLE);
break;
case REL_HWHEEL:
evdev_flush_pending_event(device, time);
time,
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL,
LIBINPUT_POINTER_AXIS_SOURCE_WHEEL,
- e->value * DEFAULT_AXIS_STEP_DISTANCE);
+ e->value * DEFAULT_WHEEL_CLICK_ANGLE);
break;
}
}
*
* If the source is @ref LIBINPUT_POINTER_AXIS_SOURCE_WHEEL, no terminating
* event is guaranteed (though it may happen).
- * Scrolling is in discrete steps, a value of 10 representing one click
- * of a typical mouse wheel. Some mice may have differently grained wheels,
- * libinput will adjust the value accordingly. It is up to the caller how to
- * interpret such different step sizes.
+ * Scrolling is in discrete steps, the value is the angle the wheel moved
+ * in degrees. The default is 15 degrees per wheel click, but some mice may
+ * have differently grained wheels. It is up to the caller how to interpret
+ * such different step sizes.
*
* If the source is @ref LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS, no
* terminating event is guaranteed (though it may happen).
struct libinput_event_pointer *ptrev;
/* the current evdev implementation scales the scroll wheel events
- up by a factor 10 */
- const int scroll_step = 10;
+ up by a factor 15 */
+ const int scroll_step = 15;
int expected = amount * scroll_step;
if (libinput_device_config_scroll_get_natural_scroll_enabled(dev->libinput_device))