diff --git a/metadata/input.xml b/metadata/input.xml index 57aaa885c..18844499d 100644 --- a/metadata/input.xml +++ b/metadata/input.xml @@ -208,6 +208,11 @@ <_long>Enables or disables natural (inverted) scrolling. false + + <_short>Tap and drag + <_long>Enables or disables tap-and-drag. + true + <_short>Drag lock <_long>Enables or disables drag lock. diff --git a/src/core/seat/pointing-device.cpp b/src/core/seat/pointing-device.cpp index 115c83630..fafc10959 100644 --- a/src/core/seat/pointing-device.cpp +++ b/src/core/seat/pointing-device.cpp @@ -28,6 +28,7 @@ void wf::pointing_device_t::load_options() touchpad_dwt_enabled.load_option(section_name + "/disable_touchpad_while_typing"); touchpad_dwmouse_enabled.load_option(section_name + "/disable_touchpad_while_mouse"); touchpad_natural_scroll_enabled.load_option(section_name + "/natural_scroll"); + touchpad_tap_and_drag_enabled.load_option(section_name + "/tap_and_drag"); touchpad_drag_lock_enabled.load_option(section_name + "/drag_lock"); mouse_accel_profile.load_option(section_name + "/mouse_accel_profile"); @@ -136,6 +137,11 @@ void wf::pointing_device_t::update_options() LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE : LIBINPUT_CONFIG_SEND_EVENTS_ENABLED); + libinput_device_config_tap_set_drag_enabled(dev, + touchpad_tap_and_drag_enabled ? + LIBINPUT_CONFIG_DRAG_ENABLED : + LIBINPUT_CONFIG_DRAG_DISABLED); + libinput_device_config_tap_set_drag_lock_enabled(dev, touchpad_drag_lock_enabled ? LIBINPUT_CONFIG_DRAG_LOCK_ENABLED : diff --git a/src/core/seat/pointing-device.hpp b/src/core/seat/pointing-device.hpp index 7c9f17260..45ce8a0c6 100644 --- a/src/core/seat/pointing-device.hpp +++ b/src/core/seat/pointing-device.hpp @@ -31,6 +31,7 @@ struct pointing_device_t : public input_device_impl_t wf::option_wrapper_t touchpad_dwmouse_enabled; wf::option_wrapper_t touchpad_natural_scroll_enabled; wf::option_wrapper_t mouse_natural_scroll_enabled; + wf::option_wrapper_t touchpad_tap_and_drag_enabled; wf::option_wrapper_t touchpad_drag_lock_enabled; }; }