mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 07:01:57 -07:00
input: add sticky option for drag_lock (#10702)
* allow configuring the sticky option for `drag_lock` * enable sticky drag_lock by default as recommended by libinput recommended here: https://lists.freedesktop.org/archives/wayland-devel/2024-November/043860.html
This commit is contained in:
@@ -1233,10 +1233,10 @@ void CInputManager::setPointerConfigs() {
|
||||
else
|
||||
libinput_device_config_tap_set_drag_enabled(LIBINPUTDEV, LIBINPUT_CONFIG_DRAG_ENABLED);
|
||||
|
||||
if (g_pConfigManager->getDeviceInt(devname, "drag_lock", "input:touchpad:drag_lock") == 0)
|
||||
libinput_device_config_tap_set_drag_lock_enabled(LIBINPUTDEV, LIBINPUT_CONFIG_DRAG_LOCK_DISABLED);
|
||||
else
|
||||
libinput_device_config_tap_set_drag_lock_enabled(LIBINPUTDEV, LIBINPUT_CONFIG_DRAG_LOCK_ENABLED);
|
||||
const auto TAP_DRAG_LOCK = g_pConfigManager->getDeviceInt(devname, "drag_lock", "input:touchpad:drag_lock");
|
||||
if (TAP_DRAG_LOCK >= 0 && TAP_DRAG_LOCK <= 2) {
|
||||
libinput_device_config_tap_set_drag_lock_enabled(LIBINPUTDEV, static_cast<libinput_config_drag_lock_state>(TAP_DRAG_LOCK));
|
||||
}
|
||||
|
||||
if (libinput_device_config_tap_get_finger_count(LIBINPUTDEV)) // this is for tapping (like on a laptop)
|
||||
libinput_device_config_tap_set_enabled(LIBINPUTDEV,
|
||||
|
Reference in New Issue
Block a user