diff --git a/metadata/input.xml b/metadata/input.xml index 5d637725f..36931a52e 100644 --- a/metadata/input.xml +++ b/metadata/input.xml @@ -251,6 +251,40 @@ + + + <_short>Trackpoint + <_long>Configure the trackpoint. + + + + <_short>Cursor diff --git a/src/core/seat/pointing-device.cpp b/src/core/seat/pointing-device.cpp index 6b2dc3257..575fd2b6f 100644 --- a/src/core/seat/pointing-device.cpp +++ b/src/core/seat/pointing-device.cpp @@ -16,6 +16,7 @@ void wf::pointing_device_t::config_t::load() mouse_cursor_speed.load_option("input/mouse_cursor_speed"); touchpad_cursor_speed.load_option("input/touchpad_cursor_speed"); touchpad_scroll_speed.load_option("input/touchpad_scroll_speed"); + trackpoint_cursor_speed.load_option("input/trackpoint_cursor_speed"); touchpad_tap_enabled.load_option("input/tap_to_click"); touchpad_dwt_enabled.load_option("input/disable_touchpad_while_typing"); @@ -25,6 +26,7 @@ void wf::pointing_device_t::config_t::load() mouse_accel_profile.load_option("input/mouse_accel_profile"); touchpad_accel_profile.load_option("input/touchpad_accel_profile"); + trackpoint_accel_profile.load_option("input/trackpoint_accel_profile"); touchpad_click_method.load_option("input/click_method"); touchpad_scroll_method.load_option("input/scroll_method"); @@ -139,6 +141,11 @@ void wf::pointing_device_t::update_options() libinput_device_config_scroll_set_natural_scroll_enabled(dev, (bool)config.touchpad_natural_scroll_enabled); } + } else if (strcasestr(libinput_device_get_name(dev), "trackpoint")) + { + libinput_device_config_accel_set_speed(dev, + config.trackpoint_cursor_speed); + set_libinput_accel_profile(dev, config.trackpoint_accel_profile); } else { libinput_device_config_accel_set_speed(dev, diff --git a/src/core/seat/pointing-device.hpp b/src/core/seat/pointing-device.hpp index e95c22e36..b33e705a1 100644 --- a/src/core/seat/pointing-device.hpp +++ b/src/core/seat/pointing-device.hpp @@ -21,10 +21,12 @@ struct pointing_device_t : public input_device_impl_t wf::option_wrapper_t tablet_motion_mode; wf::option_wrapper_t touchpad_cursor_speed; wf::option_wrapper_t touchpad_scroll_speed; + wf::option_wrapper_t trackpoint_cursor_speed; wf::option_wrapper_t touchpad_click_method; wf::option_wrapper_t touchpad_scroll_method; wf::option_wrapper_t touchpad_accel_profile; wf::option_wrapper_t mouse_accel_profile; + wf::option_wrapper_t trackpoint_accel_profile; wf::option_wrapper_t touchpad_tap_enabled; wf::option_wrapper_t touchpad_dwt_enabled; wf::option_wrapper_t touchpad_dwmouse_enabled;