Add parsing for a LIBINPUT_ATTR_TRACKPOINT_RANGE property to enable
hardware-dependent ranges. These take precedence over the sensitivity parsing.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This was to counteract hardware that doesn't work well out of the box,
resulting in quite different behavior across devices. Specifically, only
some trackpoints even have the sensitivity setting.
Change to take over all of the pointer acceleration on trackpoints, so we can
control the actual behavior mostly independent of the system setting. So we
drop the CONST_ACCEL parsing (which never was handled as const accel anyway)
and undo the effect that the SENSITIVITY udev property has. [1]
We take a default range at the default sensitivity and multiply it by the
proportion of the current sensitivity. This seems to be accurate enough.
[1] In the future, we should read not only the property but also the sysfs file to
make sure we're handling the right value, but for now this will do.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Switch to a pure factor with a max scaled after a function. The offset is just
0 now (will be removed eventually). Both are determined with a function based
on a linear/exponential regression of a sample set of data pairs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Trackpoints can send very different ranges between the various pressures.
Collect the data and print it out to get an idea of what ranges are realistic.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
There's no guarantee that libinput does the right thing if memory allocation
fails and it's such a niche case on the systems we're targeting that it just
doesn't matter. Simply abort if zalloc ever fails.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
doxygen ends the @bug command when a new section command (@code) is
encountered, leaving us with an "Example code:" on the Bug List page.
Add an empty line to cut off here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Apple touchpads don't use ABS_MT_PRESSURE but they are multitouch touchpads,
so the current pressure-based handling code doesn't apply because it expects
slot-based pressure for mt touchpads.
Apple does however send useful data for ABS_MT_WIDTH_MAJOR/MINOR, so let's use
that instead. The data provided in those is more-or-less random, so we need a
hwdb entry to track the acceptable thresholds.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The max values on ABS_MT_TOUCH_MAJOR/MINOR aren't hard limits, they basically
represent the size of a finger with (afaict) a suggestion that anything
greater than the max may be a palm. Disable the 0-100% range checks for those
axes so we can send custom events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
If the keyboard is removed while dwt thinks it is in active state, that state
is never reset and subsequent touches are ignored.
https://bugs.freedesktop.org/show_bug.cgi?id=101743
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This isn't currently hooked up to the fdo repo but it's hooked up to my
github mirror. I had SemaphoreCI hooked up to that before but it only
supports ubuntu 14.04 and the recent meson switch made it a bit hard to setup.
CircleCI supports running docker containers, so let's do that and run against
the most recent released Fedora and a recent Ubuntu. I'm not bothering with
rawhide, it's likely to increase the work for little gain when it's in a
semi-broken state.
Run the default build with a few permutations to test meson options. Run
scan-build too but that's just for the logs, eventually this may turn into a
hard failure.
Ubuntu 17.04's meson is too old, so we have to clone that from git. Install
arguments are taken from the meson.deb package.
Most of this effort was done by Benjamin Tissoires.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Cc: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Uninitialized variables, potential NULL dereferences, dead assignments and an
unused return value.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Let's switch to PEP8-compatible format to have a consistent style that matches
other python sources. This will be checked by flake8 which shows a few other
warnings, this patch only changes tabs to 4 spaces.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Group into similar props, we really only have value-based properties or
type-based properties. Compress those together so it's easier to understand.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This reduces unexpected cursor moves when placing the thumb near the border
of trackpoint buttons and upper edge of touchpad.
https://bugs.freedesktop.org/show_bug.cgi?id=101574
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
If the touchpad is suspended and resumed (e.g. lid switch), the initial slot
state may be out of sync. If a touch happened while the touchpad was suspended
and the next touch down is on exactly the same x and/or y coordinate, our
touch point would still have the coordinates of the most recently seen touch
(i.e. before touchpad suspend). This could cause a pointer jump or test case
failures.
The real-world impact of this is minimal, putting the finger down in exactly
the same spot is virtually impossible. It could cause a test case failure in the
lid_disable_touchpad() test though, the second touch sequence was on the same
y coordinate and the touch location for that whole sequence was x/0.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Already done in main(), this here is a leftover from having multiple mains fro
different tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This was useful when we had a small number of test-forks with the suites
distributed. It helped debug which one is still running and then which suites
are in it. Now that we simply distributed everything across the forks it
doesn't have a lot of usefulness and it interferes with the ability to
backtrace properly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Broken since the merge of palm pressure detection in
25d54b90d, not sure why the test suite succeeded on that one nonetheless.
I'm not 100% sure why the test does what it does but it seems to be testing
that a wide touch on the side still striggers edge scrolling and not the thumb
detection on the bottom of the touchpad. That is obsolete now, it's hard to
generically figure out the small gap between thumb and palm pressure, so this
test almost always triggers palm detection. It's obsolete.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The soname will remain fixed now, we're going through all the trouble of
having a proper map file so that we don't have to bump it all the time.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Triggered an error because we still used dep_libwacom unconditionally:
Meson encountered an error in file meson.build, line 76, column 0:
Unknown variable "dep_libwacom".
https://bugs.freedesktop.org/show_bug.cgi?id=101693
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
We used to completely ignore a finger that was within the top software button
area and then moved to the main area and remained there for a timeout. This
avoids erroneous pointer movements when the user moves the finger while using
the trackpoint.
But we also ignored physical clicks, something we should not be doing. This
patch fixes that behavior: we still ignore the finger for movement, but a
physical click now triggers a left click once we've been in the area for the
timeout.
This new behavior doesn't apply within the timeout, i.e. if a finger is in the
right top button area, moves out and immediately clicks, we still trigger a
right click. This avoids erroneous switches to left-clicks when the finger is
at the edge of the button area and moves out during the press.
Related to: https://bugs.freedesktop.org/show_bug.cgi?id=99212
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
And update the documentation for how to use the new tool. It's much more
interactive than evemu and easier to grasp, so let's advertise that.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
If a touch goes past the fixed pressure threshold it is labelled as a palm and
stays a palm. Default value is one that works well here on a T440 and is
virtually impossible to trigger by a normal finger or thumb. A udev property
is exposed so we can handle this in the udev hwdb and the new tool introduce a
few commits ago can help finding the palm detection threshold.
Unlike the other palm detection features, once a palm goes past the threshold
it remains a palm until the touch is released. This means palm overrides any
other palm detection features. For code simplicity, we don't combine the
states but merely check for pressure before and after the other palm detection
functions. If the pressure triggers, it will trigger before anything else. And
if something else is already active (e.g. edge where the pressure doesn't work
well) it will trigger as soon as the palm is released.
The palm threshold should thus be chosen with some room to spare between the
highest finger pressure.
https://bugs.freedesktop.org/show_bug.cgi?id=94236
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Most modern touchpads are around 100mm wide, so this provides a ca 8mm edge
zone on each side. The extra 3mm should provide for more reliable palm
detection, a few touches happen to be just on the edge of the 5mm mark.
https://bugs.freedesktop.org/show_bug.cgi?id=101433
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Make the libinput page more generic but suitable for short attention spans and
most importantly, point to the xf86-input-libinput man page in a more obvious
manner since we're now shadowing that.
The rest of the man pages have punctuation and formatting cleanups only.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>