Commit graph

6 commits

Author SHA1 Message Date
Peter Hutterer
cba2278c3a 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>
2016-01-27 10:03:28 +10:00
Jason Gerecke
7095b765ac doc: fix more typos
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-22 16:03:29 +10:00
Peter Hutterer
75581d5829 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>
2015-06-23 14:24:29 +10:00
Peter Hutterer
9d84dddf91 doc: add a graphic to explain tap-n-drag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-02 15:47:33 +10:00
Velimir Lisec
1ab385bc83 touchpad: end tap-and-drag with an extra tap
Currently for the tap-and-drag gesture to end user has to wait for a
timeout to expire. Make it possible to end the drag gesture by just tapping.

The allowed finger sequences to start and end a drag are thus:
tap, down, .... move ...., up  <wait for timeout>
tap, down, .... move ...., up, tap

https://bugs.freedesktop.org/show_bug.cgi?id=90255

Signed-off-by: Velimir Lisec <lisec.velimir@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

State diagram changes and a doc change squashed in.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-05-18 14:10:17 +10:00
Peter Hutterer
174364580d doc: move the wiki's tapping documentation to here
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-23 09:51:37 +10:00