input/mouse: add accel_profile custom

Support libinput LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM to define a custom
mouse pointer acceleration curve. Implements #8488.
This commit is contained in:
EBADBEEF 2025-03-04 11:38:44 -08:00
parent b3dcde8d69
commit 84e25868c4
9 changed files with 87 additions and 3 deletions

View file

@ -263,6 +263,7 @@ sway_cmd input_cmd_map_to_region;
sway_cmd input_cmd_middle_emulation;
sway_cmd input_cmd_natural_scroll;
sway_cmd input_cmd_pointer_accel;
sway_cmd input_cmd_pointer_accel_custom;
sway_cmd input_cmd_rotation_angle;
sway_cmd input_cmd_scroll_factor;
sway_cmd input_cmd_repeat_delay;

View file

@ -139,6 +139,12 @@ struct input_config_tool {
enum sway_tablet_tool_mode mode;
};
struct accel_custom {
double step;
size_t npoints;
double points[64]; /* LIBINPUT_ACCEL_NPOINTS_MAX */
};
/**
* options for input devices
*/
@ -158,6 +164,7 @@ struct input_config {
int middle_emulation;
int natural_scroll;
float pointer_accel;
struct accel_custom pointer_accel_custom;
float rotation_angle;
float scroll_factor;
int repeat_delay;