diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-06-16 17:02:02 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-06-23 14:24:29 +1000 |
commit | 75581d58297dfd022dcdf8be2daf8b6306cc0b8c (patch) | |
tree | ca193230009fe71dc8b72ddc72d3dc2dce33a858 /tools/libinput-list-devices.c | |
parent | 3fcdba6ca60bdcba4d79746f5c06415ca2f1e8a7 (diff) | |
download | libinput-75581d58297dfd022dcdf8be2daf8b6306cc0b8c.tar.gz |
Add configuration interface for tap drag-lock
In some applications, notably Inkscape, where it is common to frequently drag
objects a short distance the default to drag-lock always-on is frustrating for
users.
Make it configurable, with the current default to "on".
New API:
libinput_device_config_tap_set_drag_lock_enabled
libinput_device_config_tap_get_drag_lock_enabled
libinput_device_config_tap_get_default_drag_lock_enabled
Any device capable of tapping is capable of drag lock, there is no explicit
availability check for drag lock. Configuration is independent, drag lock may
be enabled when tapping is disabled.
In the tests, enable/disable drag-lock explicitly where the tests depend
on it.
https://bugs.freedesktop.org/show_bug.cgi?id=90928
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'tools/libinput-list-devices.c')
-rw-r--r-- | tools/libinput-list-devices.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c index d76e5db5..b3f7e2f9 100644 --- a/tools/libinput-list-devices.c +++ b/tools/libinput-list-devices.c @@ -78,6 +78,18 @@ tap_default(struct libinput_device *device) return "disabled"; } +static const char * +draglock_default(struct libinput_device *device) +{ + if (!libinput_device_config_tap_get_finger_count(device)) + return "n/a"; + + if (libinput_device_config_tap_get_default_drag_lock_enabled(device)) + return "enabled"; + else + return "disabled"; +} + static const char* left_handed_default(struct libinput_device *device) { @@ -238,6 +250,7 @@ print_device_notify(struct libinput_event *ev) printf("\n"); printf("Tap-to-click: %s\n", tap_default(dev)); + printf("Tap drag lock: %s\n", draglock_default(dev)); printf("Left-handed: %s\n", left_handed_default(dev)); printf("Nat.scrolling: %s\n", nat_scroll_default(dev)); printf("Middle emulation: %s\n", middle_emulation_default(dev)); |