Héctor Orón Martínez pushed to branch upstream-unstable at X Strike Force / lib / libinput
Commits: 2e7dd3f8 by Peter Hutterer at 2022-02-24T10:21:53+10:00 gitlab CI: fail the sanity check stage if the fork is not public Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - ea568a7b by José Expósito at 2022-03-02T08:21:49+01:00 evdev: check well-known keyboard keys on joystick/gamepad detection Create a list of well-known keyboard keys containing one the most representative key(s) of a group. The rule is based on the assumption that if the representative key is present, other keys of the group should be present as well. The groups are: - Modifiers group: KEY_LEFTCTRL. - Character group: KEY_CAPSLOCK. - Numeric group: KEY_NUMLOCK. - Editing keys: KEY_INSERT. - Multimedia keys: KEY_MUTE, KEY_CALC, KEY_FILE, KEY_MAIL, KEY_PLAYPAUSE and KEY_BRIGHTNESSDOWN. When 4 of these keys are found, the device is tagged as a keyboard. Fix #745 Signed-off-by: José Expósito <jose.exposit...@gmail.com> - - - - - 56640070 by José Expósito at 2022-03-02T08:35:23+01:00 evdev: modernize variable declaration in evdev_device_is_joystick_or_gamepad Declare the variables used to keep track of joystick buttons and keyboard keys right before they are used for better readability and consistency. Signed-off-by: José Expósito <jose.exposit...@gmail.com> - - - - - 602e8dcb by José Expósito at 2022-03-02T11:01:14+00:00 coding style: allow C99 variable declaration Allow to declare variables before they are used in new written code. Signed-off-by: José Expósito <jose.exposit...@gmail.com> - - - - - 1f1ddbc6 by pudiva chip líquida at 2022-03-08T01:33:40+00:00 touchpad: new option dwtp (disable-while-trackpointing) Add option to control whether the touchpad should be disabled while the trackpoint is in use. Fix #731 Signed-off-by: pudiva chip líquida <pud...@skylittlesystem.org> - - - - - 395d12d6 by Peter Hutterer at 2022-03-09T10:16:07+10:00 util: auto-declare the element variable in ARRAY_FOR_EACH All cases we have in our code base have an otherwise unused variable to loop through the array. Let's auto-declare this as part of the loop. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 32145857 by José Expósito at 2022-03-28T12:44:55+02:00 test: disable hold gestures when are not required Certain tests that make use of verify_left_handed_touch_motion can fail depending on how quick they are executed, specially when using Valgrind. Instead of ignoring the hold end event, use the existing mechanism to disable hold gestures where we are not interested in them. Signed-off-by: José Expósito <jose.exposit...@gmail.com> - - - - - f9176619 by Peter Hutterer at 2022-03-28T21:41:58+00:00 meson: fix a meson warning run_command() wants a check kwarg now: WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 423bb645 by Peter Hutterer at 2022-03-28T21:41:58+00:00 meson: replace a meson.source_root() with the explicit directory Removes the warning that source_root() has been deprecated since 0.56.0 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 3d064a07 by Peter Hutterer at 2022-03-28T23:25:26+00:00 doc/user: add a page to troubleshoot right-click Clickpads Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - bdd2c9b7 by Tom Stellard at 2022-04-05T17:22:42-07:00 Update valgrind.h to a newer version This updates valgrind.h to the version that was packaged in valgrind-devel-3.18.1-9.fc36. This new version contains a fix for a build failure with clang. Signed-off-by: Tom Stellard <tstel...@redhat.com> - - - - - a6ec5964 by Peter Hutterer at 2022-04-07T14:46:57+10:00 tools/record: fix the indentation of the system: section Fixes 0cdf459643bfa6264bd2d1af8f7749529ebffee1 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - a423d7d3 by Peter Hutterer at 2022-04-20T13:32:31+10:00 evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, which usually and eventually ends up being printf. If the device name contains a printf-style format directive, these ended up in the format string and thus get interpreted correctly, e.g. for a device "Foo%sBar" the log message vs printf invocation ends up being: evdev_log_message(device, "some message %s", "some argument"); printf("event9 - Foo%sBar: some message %s", "some argument"); This can enable an attacker to execute malicious code with the privileges of the process using libinput. To exploit this, an attacker needs to be able to create a kernel device with a malicious name, e.g. through /dev/uinput or a Bluetooth device. To fix this, convert any potential format directives in the device name by duplicating percentages. Pre-rendering the device to avoid the issue altogether would be nicer but the current log level hooks do not easily allow for this. The device name is the only user-controlled part of the format string. A second potential issue is the sysname of the device which is also sanitized. This issue was found by Albin Eldstål-Ahrens and Benjamin Svensson from Assured AB, and independently by Lukas Lamster. Fixes #752 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - e0813f48 by Alexander Courtis at 2022-04-26T01:55:22+00:00 AttrLidSwitchReliability quirk default unreliable->reliable - - - - - 509747c0 by Peter Hutterer at 2022-05-04T17:32:27+00:00 tools: allow limiting the axes in libinput analyse recording Use --ignore ABS_X,ABS_Y or --only ABS_X,ABS_Y to ignore or limit to only a specific axis set. Especially for tablet devices with their multitudes of axes this makes analysing a particular set easier. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - f22d1938 by Peter Hutterer at 2022-05-04T17:32:27+00:00 tools: don't print a carriage return if we're not on a tty Otherwise redirecting the output to a file leaves us with ugly ^M Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 200bc920 by Peter Hutterer at 2022-05-06T14:04:59+10:00 tools/record: fix indentation for libinput events Commit 0cdf459643bfa6264bd2d1af8f7749529ebffee1 tools/record: get rid of indent push/pop, replace with fixed indents Introduced some magic to detect if there's a '-' at the start of the format string to fix the identation. This only works if the format string is constant though, leading to an indentation error when record is run with --with-libinput. Fixes 0cdf459643bfa6264bd2d1af8f7749529ebffee1 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 4ac5fd9e by Peter Hutterer at 2022-05-06T14:05:13+10:00 tools/analyze-recording: add --print-state to always print values Helpful in comparing values that update frequently - without this the last printed value may be way off the page when some other value comes in that it needs to be compared to. Values not seen yet default to zero - we can't query those from a recording but it'll be good enough this way. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - d48c7e72 by Peter Hutterer at 2022-05-06T14:25:50+10:00 tools/analyze-recording: improve the repeated-events line printing When redirecting to a file, we don't want lines like this: .. +2 ... +5 ... +9 Let's not print anything until we have collected all those lines and then print the final result, we don't need a live update here. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 43a8d769 by Peter Hutterer at 2022-05-09T05:03:00+00:00 tools: add a libinput test tool as entry point for our test suites We already install libinput-test-suite if the meson option install-tests is set, see commit be7045cdc70d8c026d981997852cc706dab3d5b8 test: make the test suite runner available as installed binary To make other tests easily available and more discoverable, add a new tool "libinput test" with the matching man page. This will also help us to enforce some of the namespacing a bit better. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 5dd751a3 by Peter Hutterer at 2022-05-09T05:03:00+00:00 test: install libinput-test-utils as part of install-tests This tests a bunch of internal utility functions that may work differently depending on compiler flags, etc. Let's make that test available so it can be verified on an installed system. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - a6fa862c by Sean Rhodes at 2022-05-09T18:26:05+02:00 quirks: Add quirk for StarLite Mk IV Signed-off-by: Sean Rhodes <sean@starlabs.systems> - - - - - 8cb2b47b by Peter Hutterer at 2022-05-16T12:23:57+10:00 quirks: move the canvas quirk enum to the right order Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - e0e0e3aa by Peter Hutterer at 2022-05-16T12:24:16+10:00 quirks: remove an unused quirk Removed in b925a0878b0b51fe30016546b9e48a7613dccd4d quirks: switch the models with missing buttonpad to use the new attr Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 4d26736e by Sean Rhodes at 2022-05-16T05:10:10+00:00 Quirk all StarLabs trackpads Quirk all the StarLabs trackpads as they are all the same design, a clickpad with physical buttons that act as one button. Fixes #771. Signed-off-by: Sean Rhodes <sean@starlabs.systems> - - - - - a9e6cd03 by José Expósito at 2022-05-18T23:17:35+02:00 Remove "device-" file The file was unintentional added in a merge request: https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/771 Fixes: 4d26736e ("Quirk all StarLabs trackpads") Signed-off-by: José Expósito <jose.exposit...@gmail.com> - - - - - 374d32c6 by Peter Hutterer at 2022-05-23T05:43:18+00:00 tablet: remove an always-true part of an if condition A few lines north of here we return early if neither bit is set. If we get to this point, at least one bit is set so this part of the condition always evaluates to true. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 393442fd by Peter Hutterer at 2022-05-23T05:43:18+00:00 test: rename a test function to make it easier to select Because --filter-test does substring matching it's easier to have it with a unique name rather than one that is a prefix of another. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 988329d5 by Peter Hutterer at 2022-05-23T05:43:18+00:00 tablet: use a helper variable to make the code more readable Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - bfbcf173 by Peter Hutterer at 2022-05-23T05:43:18+00:00 tablet: require a minimum pressure before we process pressure events Tools default to 1% lower threshold (tip up) and 5% upper threshold (tip down). But our distance vs pressure exclusion would reset the distance for *any* pressure value, regardless how low that value was and how high distance was in comparison. A very low pressure value of less than 1% would then result in a normalized pressure of 0, so we'd effectively just reset the distance to zero and do nothing with the pressure. This can cause distance jumps when the tool arbitrarily sends low pressure values while hovering as seen in https://github.com/libsdl-org/SDL/pull/5481#issuecomment-1118969064 Commit 61bdc05fb0f84303f97daaba6ae6b49c976dbfbf from Dec 2017 "tablet: set the tip-up pressure threshold to 1%" was presumably to address this but no longer (?) works. Fix this by addressing multiple issues at the same time: - anything under that 1% threshold is now considered as zero pressure and any distance value is kept as-is. Once pressure reaches 1%, distance is always zero. - axis normalization is now from 1% to 100% (previously: upper threshold to 100%). So a tip down event should always have ~4% pressure and we may get tablet motion events with nonzero pressure before the tip down event. From memory, this was always intended anyway since a tip event should require some significant pressure, maybe too high compared to e.g. pressure-sensitive painting - where a tablet has an offset, add the same 1%/5% thresholds, on top of that offset. And keep adjusting those thresholds as we change the offset. Assuming that the offset is the absolute minimum a worn-out pen can reach, this gives us the same behaviour as a new pen. The calculation here uses a simple approach so the actual range is slightly larger than 5% but it'll do. Previously, the lower threshold for an offset pen was the axis minimum but that can never be reached. So there was probably an undiscovered bug in there. And fix a bunch of comments that were either wrong, confusing or incomplete, e.g. the pressure thresholds were already in device coordinates. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 92233df5 by satrmb at 2022-05-29T12:50:37+02:00 filter-touchpad: normalize for dpi on the touchpad-specific flat profile On mice, switching the acceleration profile to flat disables dpi normalization, because high or even switchable dpi are generally major features of a high-end mouse, and switching to flat acceleration indicates that the user wants to reduce the effects of any cursor acceleration to a minimum. Therefore we skip normalization there and let the user take full advantage of their expensive hardware. On touchpads, particularly those built into a laptop, users have to deal with whatever hardware they have; touchpad dpi is an afterthought at best, or a disaster at worst. Switching to the flat profile is more likely to be about avoiding the non-linear acceleration curve of the adaptive profile. Hence the flat profile for touchpads shouldn't copy what the one for mice does, but rather use dpi normalization like the adaptive profile. This keeps flat acceleration on low-resolution touchpads from dropping to unusably slow speeds. Signed-off-by: satrmb <10471-sat...@users.noreply.gitlab.freedesktop.org> - - - - - 164227d1 by Peter Hutterer at 2022-06-07T12:42:50+10:00 test: fix the lowres-only wheel event tests These tests gave us false positives for devices without a REL_WHEEL or REL_HWHEEL because one of the helper functions papered over missing events. We have two tests here, one for horizontal, one for vertical but they mixed WHEEL and HWHEEL in both tests. Fix this by splitting them properly, so each test only checks that axis. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 7688f354 by Peter Hutterer at 2022-06-07T12:42:50+10:00 test: ensure we always have an axis event where we expect one If we never got an event, we'd skip over the while loop and generate a false positive. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 4ae72b6e by José Expósito at 2022-06-07T19:55:42+02:00 wheel: fix Lenovo Scrollpoint quirk The IBM/Lenovo Scrollpoint mouse features a trackpoint-like stick that sends a great amount of scroll deltas. In order to handle the device, a quirk is in place to normalize the scroll events as they were relative motion. However, when high-resolution scroll was implemented, we started normalizing the hi-res events instead of the lo-res events by mistake. Fix the quirk by normalizing the right deltas. Fixes: 6bb02aaf307a ("High-resolution scroll wheel support") Signed-off-by: José Expósito <jose.exposit...@gmail.com> Tested-by: Peter Ganzhorn <peter.ganzh...@gmail.com> - - - - - d833f265 by Peter Hutterer at 2022-06-08T09:25:02+10:00 test: use a ranged test instead of a duplicated one These two tests were identical except for the WHEEL/HWHEEL differentiator, let's make this into a ranged test instead. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 35420239 by Peter Hutterer at 2022-06-08T09:25:59+10:00 test: fix a typo Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 6a1bd5b0 by Peter Hutterer at 2022-06-11T10:54:15+00:00 meson.build: check gtk targets before building We have two different dependencies on Wayland: GTK support and the wayland-protocols we use directly. If we have GTK support but wayland-protocols is not installed at meson configure time, our build fails. To avoid having multiple ifdefs in the code, let's define two new ones: HAVE_GTK_WAYLAND and HAVE_GTK_X11, both set if GTK supports that particular target (from pkgconfig) and we have the other support libraries we need. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - 7888ef27 by Peter Hutterer at 2022-06-11T10:54:15+00:00 gitlab CI: bump to F35 and F36, as well as Ubuntu 21.10 and 22.04 F33 and F34 are both EOL. This also fixes the RPM build job to automatically use the latest Fedora version and adds wayland-protocols-devel which is now needed. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> - - - - - bc363328 by José Expósito at 2022-06-11T13:47:52+02:00 libinput 1.21.0 Signed-off-by: José Expósito <jose.exposit...@gmail.com> - - - - - 30 changed files: - .gitlab-ci.yml - .gitlab-ci/ci.template - .gitlab-ci/config.yml - .gitlab-ci/libinput.spec.in - CODING_STYLE.md - completion/zsh/_libinput - + doc/user/clickpad-with-right-button.rst - doc/user/configuration.rst - doc/user/device-quirks.rst - doc/user/meson.build - doc/user/palm-detection.rst - doc/user/tools.rst - doc/user/troubleshooting.rst - include/valgrind/valgrind.h - meson.build - − quirks/10-generic-lid.quirks - − quirks/30-vendor-starlabs.quirks - + quirks/50-system-starlabs.quirks - src/evdev-mt-touchpad-buttons.c - src/evdev-mt-touchpad.c - src/evdev-mt-touchpad.h - src/evdev-tablet-pad.c - src/evdev-tablet.c - src/evdev-wheel.c - src/evdev.c - src/evdev.h - src/filter-touchpad-flat.c - src/libinput-private.h - src/libinput.c - src/libinput.h The diff was not included because it is too large. View it on GitLab: https://salsa.debian.org/xorg-team/lib/libinput/-/compare/562f7bcee0bf513824d30be31e2a64c40d5f2ee1...bc363328a704b3c5e0ee2f0fcf088de67c708979 -- View it on GitLab: https://salsa.debian.org/xorg-team/lib/libinput/-/compare/562f7bcee0bf513824d30be31e2a64c40d5f2ee1...bc363328a704b3c5e0ee2f0fcf088de67c708979 You're receiving this email because of your account on salsa.debian.org.