diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-01-22 17:59:19 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-01-27 10:03:28 +1000 |
commit | cba2278c3ab3479f8805f04dc7e80a8356e1d54d (patch) | |
tree | f6c650c9bd668db7c91c0e9c2b943874147fd51e /src/libinput-private.h | |
parent | f8bcbc2dbb8cbbd5f1dea614238fcaa0c4cb2da0 (diff) |
touchpad: add a config option to disable tap-and-drag
There are a number of use-cases where tapping may be desirable, but
tap-and-drag is not, e.g. where tapping is used to select multiple items in a
list. Having tap-and-drag on hinders this, and the nature of the interaction
means it cannot be detected based on timeouts, movement thresholds, etc.
Provide an option instead to turn tap-an-drag off. Tap-and-drag remains
enabled by default (though tapping is disabled by default).
For the touchpad tap state diagram, the new option disables the transition
from state TOUCH to state TAPPED and releases the button immediately instead.
This means that multitap-and-drag is disabled too since we now just loop
around in the single-tap state for multitap.
It also makes tapping more responsive - we don't have to wait for the timeout
before we know whether it's a tap event. The first touch time is noted, we now
send the button press with the time of the first touch and the release with
the time of the release. This ensures a realistic time diff between the two
events.
https://bugs.freedesktop.org/show_bug.cgi?id=93502
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.netto>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/libinput-private.h')
-rw-r--r-- | src/libinput-private.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libinput-private.h b/src/libinput-private.h index efffe35..eee200d 100644 --- a/src/libinput-private.h +++ b/src/libinput-private.h @@ -120,6 +120,11 @@ struct libinput_device_config_tap { enum libinput_config_tap_state (*get_enabled)(struct libinput_device *device); enum libinput_config_tap_state (*get_default)(struct libinput_device *device); + enum libinput_config_status (*set_drag_enabled)(struct libinput_device *device, + enum libinput_config_drag_state); + enum libinput_config_drag_state (*get_drag_enabled)(struct libinput_device *device); + enum libinput_config_drag_state (*get_default_drag_enabled)(struct libinput_device *device); + enum libinput_config_status (*set_draglock_enabled)(struct libinput_device *device, enum libinput_config_drag_lock_state); enum libinput_config_drag_lock_state (*get_draglock_enabled)(struct libinput_device *device); |