Benjamin Tissoires [Wed, 6 May 2015 23:41:25 +0000 (19:41 -0400)]
touchpad: add support for per-finger hovering information
When the device supports true hovering, it reports this
information through ABS_MT_DISTANCE.
When this axis is available, we should rely on it to
(un)hover the touches as BTN_TOUCH is most of the time
unreliable (generated by the mouse emulation in the kernel).
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 6 May 2015 03:14:23 +0000 (13:14 +1000)]
filter: add Simon's copyright
This code was largely lifted from the X server in
bb25b2ad297891430606c367bfabc but didn't take the copyright messages that
applied to that code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jonas Ã…dahl <jadahl@gmail.com>
Acked-by: Simon Thum <simon.thum@gmx.de>
Benjamin Tissoires [Thu, 30 Apr 2015 20:30:24 +0000 (16:30 -0400)]
test: rename hover tests into semi_mt_hover
The current hover tests are uniquely designed for some Synaptics
touchpad. libinput can handle hovering through ABS_MT_DISTANCE,
so we need to reserve the "hover" name for real hovering devices.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Benjamin Tissoires [Thu, 30 Apr 2015 20:30:23 +0000 (16:30 -0400)]
test: bcm5974: down should be marked as static
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 6 May 2015 02:16:15 +0000 (12:16 +1000)]
doc: add a page about the test suite
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 6 May 2015 01:55:48 +0000 (11:55 +1000)]
test: return the right value from open_restricted
fd or negative errno on failure.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 6 May 2015 00:49:17 +0000 (10:49 +1000)]
test: move a comment to where it belongs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 5 May 2015 07:20:35 +0000 (17:20 +1000)]
configure.ac: libinput 0.15.0 - this time for real
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 5 May 2015 06:01:59 +0000 (16:01 +1000)]
configure.ac: libinput 0.15.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 5 May 2015 06:46:18 +0000 (16:46 +1000)]
test: split test for invalid ranges into hi/lo
This test can randomly trigger a timeout, depending on how busy the machine
is.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 5 May 2015 06:44:34 +0000 (16:44 +1000)]
test: add helper function for creating a device not expected to be added
No functional changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 30 Apr 2015 04:48:42 +0000 (14:48 +1000)]
touchpad: when clearing the touchpad state, release fake touches too
Causes an error message in the device_disable_release_tap_n_drag test. When
the touchpad is suspended, all touches are ended in tp_clear_state. Since the
hovering support was added, this returns the touches to TOUCH_HOVERING, a
subsequent tp_handle_state() will turn them back into TOUCH_BEGIN based on
BTN_TOUCH and BTN_TOOL_FINGER still being down.
Clear the fake touch buttons as well after ending the touches, this way the
touch points are reset to TOUCH_NONE as intended.
Once we do that we don't need to manually change the tap finger count when
releasing taps, we can just let the count reset naturally.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Mon, 4 May 2015 06:22:36 +0000 (16:22 +1000)]
touchpad: drop the tap finger count
Use tp->nfingers_down as trigger when we have no fingers left on the touchpad
and when we should return to idle. If all touchpoints end in the same frame
tp->nfingers is 0. Thus when we handle the first tap release we transition to
IDLE which now needs to handle (and discard) any touch release events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 29 Apr 2015 01:03:08 +0000 (11:03 +1000)]
touchpad: enable clickfinger by default on some System76 laptops
Bonobo, Clevo, Galago and Kudu have clickpads and no markings ->
enable clickfinger by default.
Lemur and Gazelle have physical buttons, no need for extra configuration.
https://bugs.freedesktop.org/show_bug.cgi?id=90170
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 23 Apr 2015 02:06:42 +0000 (12:06 +1000)]
touchpad: enable clickfinger by default on chromebooks
This matches the vendor default.
Board IDs pulled from modinfo chromeos_laptop, touchpad names from a bit of
googling around.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Mon, 4 May 2015 04:14:54 +0000 (14:14 +1000)]
tools: add to, don't replace, the man page list
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Velimir Lisec [Thu, 30 Apr 2015 09:12:26 +0000 (11:12 +0200)]
touchpad: increase drag timeout
libinput supports lifting a finger during dragging and setting it back down
again to continue the drag. Curently the drag timeout is set to
DEFAULT_TAP_TIMEOUT. That is to short, when we're dragging the finger needs to
have enough time to move from one edge of the touchpad to the other. 180ms is
too short for that and causes false timeouts and thus button releases that
cancel the drag.
Introduce DEFAULT_DRAG_TIMEOUT and set it to 500 ms.
Signed-off-by: Velimir Lisec <lisec.velimir@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Mon, 27 Apr 2015 23:50:02 +0000 (09:50 +1000)]
touchpad: fix double/multitap timeouts
The current doubletap timeout was incorrect, it gave the user only 180ms to
touch, release, touch, release to recognise a doubletap. But it would also set
a timeout on the second release, delaying the button events by 180ms.
Instead, re-arm the timer on the second touch down. This gives the user 180ms
to release and touch again (or time out). This makes doubletap much more
reliable and reduces the delay between the release and the button events
arriving since the finger down time is already counted.
Same fix for MULTITAP, though we already armed the timer on touch down so we
just have to remove the new timer on touch release which did little but delay
everything.
https://bugs.freedesktop.org/show_bug.cgi?id=90172
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Sun, 3 May 2015 22:42:44 +0000 (08:42 +1000)]
test: add timeout_tapndrag()
Prep work for the upcoming patch to extend the timeout for tap-and-drag. And
switch the tests that rely on it over to the new function.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 4 May 2015 00:21:02 +0000 (10:21 +1000)]
test: reduce the multitap tests to 5 taps only
Reduces the risk of accidental timeouts
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 1 May 2015 01:41:12 +0000 (11:41 +1000)]
Fix a couple of coding style issues
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 30 Apr 2015 23:09:38 +0000 (09:09 +1000)]
timer: set O_NONBLOCK on the timerfd
Resetting a timerfd empties the data on the fd, so if the timer is reset
between triggering and us reading it, we may block trying to read it.
Since we read events off a device in a loop, a device sending a continuous
flow of events may cause the timer to trigger but delay reading it. If one of
the events cause e.g. the tap timer to be set, the timerfd may be empty at the
time of reading.
Suggested-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Derek Foreman [Thu, 30 Apr 2015 16:43:28 +0000 (11:43 -0500)]
Set O_CLOEXEC when opening devices
We'd rather keep these out of the hands of children.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 30 Apr 2015 02:41:50 +0000 (12:41 +1000)]
tools: ship the event-debug tool as an installed libinput-debug-events tool
Rebuild the same binary but without the special LDFLAG. The event-debug tool
is left as-is to allow for easy debugging with gdb, the new tool is now
libtool-enabled and can't be run directly in gdb without installing it first.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 29 Apr 2015 04:53:27 +0000 (14:53 +1000)]
test: add a note to the touch double-down event
libevdev filters the ABS_MT_TRACKING_ID event for a double-touch down like
this so we never see this in libinput. We see an error message from libevdev
but otherwise this test is a false negative.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 30 Apr 2015 01:24:48 +0000 (11:24 +1000)]
timer: drain data on the timerfd when it triggers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 30 Apr 2015 04:02:30 +0000 (14:02 +1000)]
tools: fix broken build if builddir != srcdir
Introduced in
6b6f8151a41147eb44d08f33de143b43eb004563, libinput-version.h is
in the builddir.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 30 Apr 2015 05:34:01 +0000 (15:34 +1000)]
evdev: indentation fix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 30 Apr 2015 02:36:28 +0000 (12:36 +1000)]
tools: fix typo in man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 28 Apr 2015 21:53:56 +0000 (07:53 +1000)]
tools: print version number in libinput-list-devices
Makes debugging a bit easier when you can just ask users to do that instead of
digging around in whatever packaging system they have.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Peter Hutterer [Tue, 28 Apr 2015 06:45:35 +0000 (16:45 +1000)]
evdev: enable button scrolling by default on mice without wheels
If we have a middle button but no wheels, enable on-button scrolling for the
middle button by default. This applies e.g. to the Logitech trackball added as
new test device here.
This makes the separate check for POINTINGSTICK obsolete but I'd rather leave
this in to be more explicit about it.
https://bugs.freedesktop.org/show_bug.cgi?id=90208
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 28 Apr 2015 06:40:29 +0000 (16:40 +1000)]
test: expand the middle button emulation tests
Instead of excluding the pointing stick devices, disable middle button
scrolling on those and run them anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 28 Apr 2015 06:43:01 +0000 (16:43 +1000)]
test: change the suite name for two of the pointer button tests
No need for a separate test suite group here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 28 Apr 2015 01:53:11 +0000 (11:53 +1000)]
test: fix touch up for multitap-n-drag test
Released the wrong touch point, causing warnings:
libevdev error in sanitize_event: BUG: Device "litest SynPS/2 Synaptics
TouchPad" received a double tracking ID 6 in slot 0.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 28 Apr 2015 00:43:55 +0000 (10:43 +1000)]
doc: expand scrolling documentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 24 Apr 2015 05:27:34 +0000 (15:27 +1000)]
test: upgrade to the Microsoft Surface Type Cover
Almost identical to the one we already had but this one also has ABS_X/Y to
mess things up. Update the existing one, no need to add a separate device here.
The fake MT touch test needs to be updated now though. A fake MT device may be
an absolute device too, so if we use the touch_down() handlers we may generate
abs pointer events. That's valid, we only check for no touch events here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Peter Hutterer [Fri, 24 Apr 2015 04:59:18 +0000 (14:59 +1000)]
evdev: init pointer accel filters when we have rel x/y axes
Some devices provide abs x/y and rel x/y. We can't know which event the device
will send. The Microsoft Surface Type Cover sends relative events, which
then crashes libinput when we don't have an accel filter set up.
So instead of checking that the device doesn't have ABS_X/Y, check for the
device to have REL_X/Y instead.
https://bugzilla.redhat.com/show_bug.cgi?id=1206869
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Peter Hutterer [Fri, 24 Apr 2015 05:01:55 +0000 (15:01 +1000)]
evdev: reject devices with only REL_X but no REL_Y (or vice versa)
Not sure if any exists, if they do let's see if a user files a bug report
first so we know what to do with those (they're most likely buttonsets).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Peter Hutterer [Fri, 24 Apr 2015 05:07:58 +0000 (15:07 +1000)]
test: add the MS Surface Type Cover to the list of devices
Added in
d2842893a828407e3c4d2459a382f8c7179b2f51 but never added to the list
of devices so none of the tests ran against it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Peter Hutterer [Fri, 24 Apr 2015 05:18:17 +0000 (15:18 +1000)]
test: fix features for the MS Surface Cover
LITEST_KEYBOARD is the type, LITEST_KEYS is the feature.
And this device has buttons, so mark it as such.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Peter Hutterer [Fri, 24 Apr 2015 05:12:09 +0000 (15:12 +1000)]
test: drop REP_DELAY from the ms surface cover event codes
litest doesn't know how to set this up and we don't need it anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Peter Hutterer [Fri, 24 Apr 2015 05:24:11 +0000 (15:24 +1000)]
test: check for event as not null before dereferencing it
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Peter Hutterer [Sun, 26 Apr 2015 22:56:50 +0000 (08:56 +1000)]
test: fix a memory leak in the touch test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
Peter Hutterer [Mon, 27 Apr 2015 01:00:24 +0000 (11:00 +1000)]
test: add semi-mt 2fg scroll test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Hans de Goede [Fri, 24 Apr 2015 14:49:36 +0000 (16:49 +0200)]
touchpad: Only use slot 0 deltas for 2fg scrolling on semi-mt touchpads
Some semi-mt model touchpads have a better accuracy for slot 0 then for
slot 1 (they only have 2), so on semi-mt models only use the movement of
the touch in slot 0 for 2fg scrolling, rather then the average movement of
the 2 touches.
This fixes 2fg scrolling being choppy / jumpy in some cases.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=89683
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Also needed: change the touchpad scroll source test to use more separate
events. The current litest semi-mt touch implementation only moves the first
touch on every second move. With 5 movements this isn't enough to fill the
motion history and generate events, so double it to 10 so we're guaranteed to
get scroll events.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Benjamin Tissoires [Thu, 23 Apr 2015 18:32:40 +0000 (14:32 -0400)]
evdev: use a different filter for low resolution touchpad on the Lenovo X230
Those touchpads presents an actual lower resolution that what is
advertised.
We see some jumps from the cursor due to the big steps in X and Y
when we are receiving data.
For instance, we receive:
E: 13.471932 0003 0000 16366 # EV_ABS / ABS_X 16366
E: 13.471932 0003 0001 9591 # EV_ABS / ABS_Y 9591
E: 13.471932 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
E: 13.479924 0003 0000 16316 # EV_ABS / ABS_X 16316
E: 13.479924 0003 0001 9491 # EV_ABS / ABS_Y 9491
E: 13.479924 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
E: 13.487939 0003 0000 16271 # EV_ABS / ABS_X 16271
E: 13.487939 0003 0001 9403 # EV_ABS / ABS_Y 9403
E: 13.487939 0000 0000 0000 # ------------ SYN_REPORT (0) ----------
-> jumps of ~50 in X in each report, and ~100 for Y.
Apply a factor to minimize those jumps at low speed, and try
keeping the same feeling as regular touchpads at high speed.
It still feels slower but it is usable at least
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Derek Foreman [Fri, 24 Apr 2015 22:23:13 +0000 (17:23 -0500)]
test: add LITEST_KEYS to roccat mouse features
The mouse can generate key events, so it should be carry that feature bit.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Derek Foreman [Fri, 24 Apr 2015 22:21:18 +0000 (17:21 -0500)]
test: Add negative test for libinput_device_keyboard_has_key()
Ensure we get a -1 return for non-keyboard devices.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 24 Apr 2015 02:25:50 +0000 (12:25 +1000)]
touchpad: allow BTN_LEFT in clickfinger mode without touches
On the Logitech T650 it's quite easy to trigger a click without touching the
surface. For software buttons we discard those clicks because we can't tell
where the finger is to decide on left vs right click.
It takes effort to trigger a click with two fingers without triggering a touch
though, so in clickfinger mode post a click without touches as single-finger
click.
https://bugs.freedesktop.org/show_bug.cgi?id=90150
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Fri, 24 Apr 2015 02:36:43 +0000 (12:36 +1000)]
touchpad: minor code cleanup
No functional changes, just reducing to one instance of the call with a
variable parameter.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 24 Apr 2015 02:23:45 +0000 (12:23 +1000)]
touchpad: don't re-use button variable
Split into button and area, the latter of which is the bitmask of which area
we're in. No functional changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 24 Apr 2015 02:02:28 +0000 (12:02 +1000)]
touchpad: indentation and other whitespace fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 20 Apr 2015 18:29:44 +0000 (14:29 -0400)]
evdev: add support for LIBINPUT_MODEL_* udev tags
Some devices need specific configuration or different defaults.
Push that into udev rules and a hwdb file, that's where detection is the
easiest. The LIBINPUT_MODEL_ prefix is used to determine some type of device
model. Note that this property is a private API and subject to change at
any time without notice.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Hans de Goede [Wed, 22 Apr 2015 08:32:38 +0000 (10:32 +0200)]
test-touchpad: Adjust touchpad_edge_scroll_no_2fg test for gesture support
Unlike all the other 2fg scroll tests the touchpad_edge_scroll_no_2fg test
puts the 2 fingers down quite far apart, this makes the pinch vs scroll
gesture detection code in the gestures branch detect a pinch causing the
test to fail.
This commit brings the finger placement in line with the other 2fg scroll
tests fixing this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 22 Apr 2015 04:36:25 +0000 (14:36 +1000)]
Add libinput_device_keyboard_has_key()
Similar to libinput_device_pointer_has_button(), this function returns whether
a given device has a specific keycode.
This enables a caller to determine if the device is really a keyboard (check
for KEY_A-KEY_Z) or just a media key device (check for KEY_PLAY or somesuch),
depending on the context required.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Hans de Goede [Wed, 1 Apr 2015 09:03:19 +0000 (11:03 +0200)]
evdev: Add support for POINTINGSTICK_CONST_ACCEL udev property
There is quite a wide spread in the delta events generated by trackpoints,
some generate deltas of 1-2 under normal use, while others generate deltas
from 1-20.
It is desirable to normalize trackpoint deltas just like we are normalizing
mouse deltas to 1000 dpi, so as to give different model laptops aprox.
the same trackpoint cursor speed ootb.
Recent versions of udev + hwdb set a POINTINGSTICK_CONST_ACCEL udev property
which can be used to adjust trackpoints which are too slow / too fast
ootb, this commit implements support for that property.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 22 Apr 2015 05:31:21 +0000 (15:31 +1000)]
tools: use doubles to back the scroll bars
Slow scrolling otherwise won't move them because we keep truncating the
subpixels.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 21 Apr 2015 23:19:13 +0000 (09:19 +1000)]
configure.ac: libinput 0.14.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 21 Apr 2015 23:18:34 +0000 (09:18 +1000)]
tools: distribute the new man page
Fixes distcheck
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 21 Apr 2015 22:20:56 +0000 (08:20 +1000)]
configure.ac: libinput 0.14.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 21 Apr 2015 22:24:27 +0000 (08:24 +1000)]
Update to v4.0 kernel header
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 21 Apr 2015 22:20:34 +0000 (08:20 +1000)]
Sort the middle button symbols additions correctly
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 21 Apr 2015 22:16:42 +0000 (08:16 +1000)]
doc: add a note that sometimes there's more than one ID_INPUT_* set
Just setting one of them on a device doesn't guarantee that libinput takes
that as device type.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 21 Apr 2015 08:24:39 +0000 (18:24 +1000)]
tools: add --set-scroll-button as option
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 21 Apr 2015 08:01:26 +0000 (18:01 +1000)]
test: mix mixing of middle buttons state vs config status enum types
Coverity complaint: mixed_enums: Mixing enum types enum
libinput_config_middle_emulation_state and enum libinput_config_status
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 21 Apr 2015 02:07:55 +0000 (12:07 +1000)]
touchpad: don't post 2fg scrolling when edge scrolling is enabled
https://bugs.freedesktop.org/show_bug.cgi?id=90070
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 21 Apr 2015 04:55:49 +0000 (14:55 +1000)]
test: adjust the movement size for edge scroll timeout testing
The goal of this test is to make sure that the deltas are less than 5, which
is the scroll trigger for movement-based edge scrolling. The litest suite
takes percentages of the device, so use a scale factor to change how far we
move on the tablet. The wacom tablet is 141mm, the movement must be smaller to
provide small-enough deltas.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 21 Apr 2015 03:53:55 +0000 (13:53 +1000)]
test: extend edge scrolling tests to all non-clickpads
The single finger requirement dates back to when we couldn't configure the
scroll method. Now we can, so let's run the tests on as many suitable devices
as possible.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 21 Apr 2015 02:05:36 +0000 (12:05 +1000)]
test: enable edge scrolling in all edge scroll tests
Just to make sure it is enabled (it should be anyway).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 21 Apr 2015 01:57:23 +0000 (11:57 +1000)]
tools: add --set-scroll-method commandline flag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Fri, 17 Apr 2015 05:59:36 +0000 (15:59 +1000)]
evdev: accept but disable ABS_MISC and above for min/max == 0
This is sort-of legitimate, so simply disable the axes and continue.
Any real axis we require to have a real range.
https://bugs.freedesktop.org/show_bug.cgi?id=90090
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 16 Apr 2015 00:19:11 +0000 (10:19 +1000)]
touchpad: introduce MULTITAP for multi-tap-and-drag
Once we have a doubletap, enter a loop in the state machine where we can tap
multiple times and either get a multi-click or a multi-click drag-and-drop.
The sequence down/up down/up down/up produces a triple-click. The sequence
down/up down/up down/up down produces a triple-click with a button down for
dragging. Yes, that glorious octuple-tap-and-drag, it is now possible. World
domination has been achieved, thank you for playing.
We don't know when we finish tapping now, so add a timeout to send the last
click event once the finger has been released for the last time. This
guarantees that the timestamp of the last button down is later than the
last release. This avoids the bug fixed in synaptics commit
xf86-input-synaptics-1.8.0-21-g37d34f0 (some application don't handle
doubletap correctly without the timestamps).
This works for double-tap immediately, for multi-tap we need to remember the
timestamp of the first press event and use it for the release event so that
there's a forced gap between the release and the second press.
https://bugs.freedesktop.org/show_bug.cgi?id=89511
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 16 Apr 2015 00:42:16 +0000 (10:42 +1000)]
test: add litest_is_button_event
Makes it easier from a caller to check for common things without all the other
boilerplate code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 14 Apr 2015 04:43:53 +0000 (14:43 +1000)]
test: middle button emulation tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 14 Apr 2015 04:40:49 +0000 (14:40 +1000)]
touchpad: enable middle button emulation on some touchpads
If the touchpad has left/right physical buttons but no middle button, force
middle button emulation - without a config option, it's always on.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 14 Apr 2015 04:41:39 +0000 (14:41 +1000)]
evdev: enable middle button configuration on some devices
Devices that have left and right buttons but no middle button get middle
button emulation (without config). Devices that have a middle button too get
a config option but default to off. Most mice have LMR set as buttons,
regardless whether they have a middle button.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Mon, 13 Apr 2015 06:38:44 +0000 (16:38 +1000)]
evdev: add support for middle button emulation
This is just the required framework, it's not hooked up to anything just yet.
Hooking it up comes as separate commit to better detail why/when a device
supports emulation.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 14 Apr 2015 02:08:33 +0000 (12:08 +1000)]
Add middle mouse button emulation config options
Adds the following quartett of functions to enable/disable middle mouse button
emulation on a device:
libinput_device_config_middle_emulation_is_available()
libinput_device_config_middle_emulation_set_enabled()
libinput_device_config_middle_emulation_get_enabled()
libinput_device_config_middle_emulation_get_default_enabled()
This patch only adds the config framework, it is not hooked up to anything
yet.
Note: like other features this is merely the config option, some devices will
provide middle button emulation without exposing it as configuration. i.e. the
return value of libinput_device_config_middle_emulation_is_available() only
tells you whether you can _configure_ middle button emulation.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Mon, 13 Apr 2015 04:47:26 +0000 (14:47 +1000)]
evdev: add evdev_pointer_notify_physical_button
No functional changes at this point, this merely splits up any physical
buttons (i.e. that represent buttons that exist on that device) vs. other
buttons that are emulated in some way or another.
This is in preparation for the addition of middle button emulation.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 14 Apr 2015 05:18:19 +0000 (15:18 +1000)]
toucphad: fix a comment for the new min touchpad palm detection size
Missing from
26062e84693341d5a6b7b33af91a50a9cd37dfe2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 16 Apr 2015 06:13:01 +0000 (16:13 +1000)]
touchpad: reduce palm detection threshold to 70mm
https://bugzilla.redhat.com/show_bug.cgi?id=1209753 lists a touchpad 76mm wide
that suffers from palm touches
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 15 Apr 2015 05:21:08 +0000 (15:21 +1000)]
touchpad: don't allow taps in the top half of the palm exclusion zone.
Touches in the exclusion zone are ignored for palm detection and don't move
the cursor. Tapping however triggers before we know whether something is a
palm or not, so we get erroneous button clickst.
If a tap happens in the top half of the touchpad, within the palm exclusion
zones, ignore it for tap purposes. To avoid further complicating the state
machine simply pretend there was a movement > threshold on that finger. This
advances the tap state machine properly that no button events are sent for
this finger.
https://bugs.freedesktop.org/show_bug.cgi?id=89625
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 14 Apr 2015 07:04:45 +0000 (17:04 +1000)]
touchpad: only pair internal trackpoint devices with internal touchpads
Internal touchpads with trackpoints are either BUS_I8042 or BUS_I2C, but not
BUS_USB. Lenovo sells external keyboards with a trackpoint built-in, make sure
we don't pair that trackpoint with the internal touchpad.
And likewise, the internal trackpoint should not be paired with e.g. a wacom
touch device.
Lenovo had one external device that has a trackpoint and a touchpad on an
external keyboard. That device won't be covered with this patch, if we have a
user we can re-consider.
https://bugs.freedesktop.org/show_bug.cgi?id=89935
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 15 Apr 2015 01:44:54 +0000 (11:44 +1000)]
tools: add a tool to list local devices and the default configurations
xinput or an equivalent isn't available under wayland, but the majority of
use-cases of "why doesn't my device work" or "why does feature X not work"
should be covered by simply listing the local devices and their config
options.
Example output:
Device: SynPS/2 Synaptics TouchPad
Kernel: /dev/input/event4
Group: 9
Seat: seat0, default
Size: 97.33x62.40mm
Capabilities: pointer
Tap-to-click: disabled
Left-handed: disabled
Nat.scrolling: disabled
Calibration: n/a
Scroll methods: *two-finger
Click methods: *button-areas clickfinger
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 15 Apr 2015 05:33:41 +0000 (15:33 +1000)]
touchpad: extend two debug messages
Makes it quicker to know where it's coming from.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 14 Apr 2015 02:26:01 +0000 (12:26 +1000)]
evdev: merge two conditions into one with a sub condition
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 15 Apr 2015 00:09:34 +0000 (10:09 +1000)]
evdev: add a event-debugging log statement (ifdef'd out)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 15 Apr 2015 00:21:47 +0000 (10:21 +1000)]
Return INVALID before UNSUPPORTED for click methods
All other config options already follow this behavior.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 13 Apr 2015 00:23:47 +0000 (10:23 +1000)]
test: add a scrollwheel-only device
This currently requires a specific udev rule to tag the device, once the
matching bits are upstream we can drop this.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Mon, 13 Apr 2015 00:23:46 +0000 (10:23 +1000)]
Don't post a events for a missing capability
Log a bug instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Mon, 13 Apr 2015 00:23:45 +0000 (10:23 +1000)]
evdev: any scroll device must have CAP_POINTER
Follow-up to
e2f61b8fb74a06b86abd02caa4cdfde5edc53a32.
Scroll events are sent through the pointer interface, so we must set the
capability. Otherwise a caller may not have the required bits set up and is a
bit surprised by events coming out of an interface the device doesn't actually
have (xf86-input-libinput crashes when this happens).
Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Fri, 10 Apr 2015 05:37:15 +0000 (15:37 +1000)]
tools: add a tool for printing pointer acceleration parameters
Prints the various pointer accel behaviors into a format understood by
gnuplot, which then provides prettiness.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Thu, 9 Apr 2015 14:42:00 +0000 (16:42 +0200)]
filter: Make acceleration range wider
The main purpose of this patch is to allow the user to actually slow
down pointer movement using libinput_device_config_accel_set_speed, this
is achieved by changing the max-accel setting from "2.0 - speed" to
"2.0 - speed * 1.5", resulting in a max-accel of 0.5 when the user configures
speed at -1.0, the other accel profile parameters are adjusted by the same
factor to keep the curve the same.
This means that the user can get the exact same behavior as before by
multiplying the old setting by 0.6667 (2/3), this also means that this
change not only allows the user to select a slower speed, but to keep
things balanced the same as before, also a higher speed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 10 Apr 2015 05:45:59 +0000 (15:45 +1000)]
tools: add commandline flag to control the pointer accel speed
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 10 Apr 2015 05:45:35 +0000 (15:45 +1000)]
tools: apply the config options for the event-gui helper too
This changes the current behavior of tapping enabled-by-default in the GUI
helper.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 9 Apr 2015 05:27:34 +0000 (15:27 +1000)]
touchpad: rename real_touches to num_slots
Less ambiguous since real_touches can be interpreted to "current number of
real touches as opposed to fake touches". Which it isn't, this variable holds
the number of slots.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 9 Apr 2015 05:27:33 +0000 (15:27 +1000)]
touchpad: a touch in TOUCH_NONE doesn't need to be ended
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 9 Apr 2015 04:23:16 +0000 (14:23 +1000)]
touchpad: detect fake finger overflow after BTN_TOOL_QUINTTAB
Up to QUINTTAP, we count fake fingers through the BTN_TOOL_*TAP kernel defines.
Once we exceed QUINTTAP, the nfake_finger count returns to 0 and
tp_unhover_touches terminates all touch sequences. The most visible effect of
this was stopped in 591a41f but the problem remained.
Since we're not using 5 fingers for anything, use that to set the
overflow flag. The kernel gives us either a BTN_TOUCH 0 (all
released) or a lower BTN_TOOL_*TAP to unset the flag when we go below 5
fingers again.
And if we overflow, we can skip the unhovering of touch points since we a)
have a decent touchpad that gives us real touchpoints and b) hovering isn't
supported for 5 touches anyway.
https://bugs.freedesktop.org/show_bug.cgi?id=89800
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 8 Apr 2015 21:51:51 +0000 (07:51 +1000)]
evdev: reject devices with only one of x/y resolution
This is a kernel bug, reject such devices outright. This saves us from a bunch
of extra double checks to make sure that the resolutions are always set up.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 8 Apr 2015 07:00:50 +0000 (17:00 +1000)]
touchpad: delay fake finger processing until the EV_SYN
A switch from BTN_TOOL_FINGER to BTN_TOOL_DOUBLETAP sets the former to 0, then
the latter to 1, within the same frame. In the previous code we'd end the
first touchpoint, then start two new ones immediately after when the DOUBLETAP
comes in. This causes bug notices in the edge scrolling code and finger
miscounts in the tapping code (since neither processes the change, there is no
SYN_REPORT between the two).
Only update the state bits when we get the events, handle the fake touch
sequence start/end on SYN_REPORT instead.
https://bugs.freedesktop.org/show_bug.cgi?id=89949
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>