summaryrefslogtreecommitdiff
path: root/meson.build
AgeCommit message (Collapse)AuthorFilesLines
2018-03-09Merge branch 'wip/hysteresis-wobbles'Peter Hutterer1-1/+1
2018-03-09Extract and reset the abs fuzz value for the x/y axesPeter Hutterer1-1/+1
The kernel fuzz handling is buggy, especially when we want to rely on the fuzz value for our hysteresis. But since this is a hw property and (at least sometimes) set by the driver, we can't make this a pure libinput hwdb set either. So our workaround is: * extract the (non-zero) fuzz into a udev property so we don't lose it * set the fuzz to 0 to disable the in-kernel hysteresis * overwrite our internal absinfo with the property fuzz This way we get to use the hw-specified fuzz without having the kernel muck around with it. We also get to use the EVDEV_ABS_ values in 60-evdev.hwdb to override a driver-set fuzz. Two drawbacks: - we're resetting the kernel fuzz to 0, this affects any other users of the device node. That's probably a minor impact only. - we can only save this in a udev property there's a risk of this information getting lost when playing around with udev rules. That too should be a minor issue. https://bugs.freedesktop.org/show_bug.cgi?id=105303 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-08tools: record udev properties in libinput-recordPeter Hutterer1-1/+1
Only the ones we care about in libinput but for those it's handy to know which ones are set (especially the LIBINPUT_MODEL ones). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-08meson.build: fix vcs_tag fallback argumentPeter Hutterer1-2/+2
This needs to be specified as keyword argument, and meson < 0.41 doesn't allow for a missing fallback. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-07meson: make libinput-git-version.h a source of libinput-recordPeter Hutterer1-5/+5
Fixes the dependency chain, otherwise a race condition between building libinput-record and building the git version header causes random build failures. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-06tools: add the git version in the libinput-record outputPeter Hutterer1-0/+5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-05pad: use libwacom to get the evdev to button number mappingPeter Hutterer1-0/+9
Some of wacom's tablets, notably the Bamboo series, have a non-predictable scheme of mapping the buttons to numeric button numbers in libwacom. Since we promise sequential button numbers, we need to have those identical to libwacom, otherwise it's impossible to map the two together. Most tablets have a predictable mapping, so this does not affect the majority of devices. For the old-style bamboos, this swaps the buttons around with the buttons being ordered vertically top-to-bottom in libwacom. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
2018-03-01tools: add a libinput-replay toolPeter Hutterer1-0/+9
Similar in style to evemu-play but parses the YAML printed by libinput-record. Note that this tool requires python-libevdev which is a new package and may not be packaged by your distribution. Install with pip3 or alternatively, just ignore libinput-replay, it's a developer tool only anyway. User-visible differences to evemu-play: * supports replaying multiple devices at the same time. * no replaying on a specific device, we can add this if we ever need it * --verbose prints the event to stdout as we are replaying them. This is particularly useful on long recordings - once the bug occurs we can ctrl+c and match up the last few lines with the recordings file. This allows us to e.g. drop the rest of the file. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-01tools: add a libinput-record toolPeter Hutterer1-0/+15
This is a tool that does effectively the same job as evemu-record. evemu has two disadvantages: its API is clunky and hard to extend even for simple features. And it has a custom file format that requires special processing but is difficult to extend and hard to write manually. e.g. the bitmasks require keeping a line number state to know which bit an entry refers to. libinput-record records the same data but the output is YAML. That can be processed easier and extended in the future without breaking the parsing. We can (in the future) also interleave the evemu output with libinput's debug output, thus having a single file where the events can be compared and analysed without the need for replaying. Likewise, we can easily annotate the file with parsable bits of information without having to shove all that into a comment (like version numbers of libinput, kernel, etc). User-visible differences to evemu-record: * the output file requires an explicit -o or --output-file argument * no evemu-describe equivalent, if you just want the description simply cancel before any events are sent * to see key codes, a --show-keycodes flag must be supplied, otherwise all 'normal' keys end up as KEY_A. This protects against inadvertent information leakage * supports a --multiple option to record multiple devices simultaneously. All recordings have the same time offset, it is thus possible to reproduce bugs that depend on the interaction of more than one device. And to answer the question of: why a printf-approach to writing out yaml instead of a library, it's simply that we want to be able to have real-time output of the recording. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-28meson.build: bump to 1.10.900Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-21meson: add the 221 version to the libsystemd dependencyPeter Hutterer1-1/+1
The sd-bus interface we're using wasn't public until 221. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-16meson: Fix absolute libdir case in install scriptQuentin Glidic1-1/+1
If libdir is an absolute path (which means it’s outside of prefix) we would wrongly add the prefix to it in the install script. Just pass the correct libdir from Meson directly thanks to join_paths() magic. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-16meson: Fix bindir usage in install scriptQuentin Glidic1-1/+2
Since the install script cannot know the correct bindir, just pass it from Meson directly. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-13Add a test device for aiptek tabletsPeter Hutterer1-0/+1
This tablet advertises tilt but doesn't actually have it. Let's rule out tilt for all aiptek devices until someone complains. Recording from: https://bugzilla.redhat.com/show_bug.cgi?id=1535755 Related to: https://bugs.freedesktop.org/show_bug.cgi?id=104911 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-13evdev: add a quirk to disable debouncing on the MS Nano TranscieversPeter Hutterer1-0/+1
A set of wireless devices that can scramble the timestamps, so we get press/release within 8ms even though I doubt the user is capable of doing this. Since they're generally good quality anyway, let's just disable debouncing on those until someone complains and we need something more sophisticated. https://bugs.freedesktop.org/show_bug.cgi?id=104415 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-13libinput 1.10.01.10.0Peter Hutterer1-1/+1
2018-02-06libinput 1.9.9021.9.902Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-01test: inhibit nasty keys and switches during test runsPeter Hutterer1-1/+6
Having the system suspend or shutdown halfway through a test run is a tad annoying. So let's talk to logind and tell it to inhibit the various keys we're testing. https://bugs.freedesktop.org/show_bug.cgi?id=104720 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-22libinput 1.9.9011.9.901Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-12-01meson.build: add missing udev dependencies and linux/input.h includesGreg V1-1/+6
Almost everything requires libudev because libinput.h pulls it in. Make this an explicit dependency. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-29doc: add a doc for trackpointsPeter Hutterer1-0/+1
2017-11-22meson.build: bump to 1.9.900Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-20Merge branch 'wip/button-debouncing-v3'Peter Hutterer1-0/+3
2017-11-20evdev: add new debouncing codePeter Hutterer1-0/+2
The current debouncing code monitors events and switches on when events are too close together. From then on, any event can be delayed. Vicente Bergas provided an algorithm that avoids most of these delays: on a button state change we now forward the change without delay but start a timer. If the button changes state during that timer, the changes are ignored. On timer expiry, events are sent to match the hardware state with the client's view of the device. This is only done if needed. Thus, a press-release sequence of: PRP sends a single press event, a sequence of PRPR sends press and then the release at the end of the timeout. The timeout is short enough that the delay should not be noticeable. This new mode is called the 'bounce' mode. The old mode is now referred to as 'spurious' mode and only covers the case of a button held down that loses contact. It works as before, monitoring a button for these spurious contact losses and switching on. When on, button release events are delayed as before. The whole button debouncing moves to a state machine which makes debugging a lot easier. See the accompanying SVG for the diagram. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-20fallback: create the evdev-fallback.h header filePeter Hutterer1-0/+1
So we can split up evdev-fallback.c into multiple files where needed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-17tools: replace the tap time measuring tool with a python onePeter Hutterer1-8/+2
A lot easier to process data in python than in C. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-By: Dima Ryazanov <dima@gmail.com> Tested-By: Dima Ryazanov <dima@gmail.com>
2017-11-09test: add the wmi hotkeys test devicePeter Hutterer1-0/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-30libinput 1.9.11.9.1Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-26meson: require GTK 3.20Peter Hutterer1-1/+1
For GDK_SEAT_CAPABILITY_ALL_POINTING https://bugs.freedesktop.org/show_bug.cgi?id=103462 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-20test: add a wacom bamboo test devicePeter Hutterer1-0/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-19libinput 1.9.01.9.0Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-10libinput 1.8.9021.8.902Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-27libinput 1.8.9011.8.901Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-25fallback: move the fallback code into a separate filePeter Hutterer1-0/+1
Split out the fallback-specific device handling from the more generic evdev-specific handling (which is supposed to be available for all devices). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-25Merge branch 'wip/litest-use-sections-for-tests-v2'Peter Hutterer1-5/+4
2017-09-25fallback: allow for multiple keyboards to toggle the lid switchPeter Hutterer1-0/+2
Previously we only listened for events on the first one to come up, based on the assumption that there can only be one internal keyboard. The Razer Blade laptop keyboards come with with multiple event nodes, all looking like a normal keyboard. The one that comes up first is one for special keys, so typing on the internal keyboard after a lid switch does not toggle the write state. Fix this by allowing for up to 3 keyboard listeners for a lid switch. https://bugs.freedesktop.org/show_bug.cgi?id=102039 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-21test: switch to a TEST_DEVICE macro for all the litest test devicesPeter Hutterer1-5/+4
The test device initialization code was a bit of duplicated boilerplate and required adding a reference to the devices to the 'devices' list in litest.c. Automate this with a new TEST_DEVICE macro that adds the devices to a custom section in the binary, then loops throught that section to get the device out. This reduces the boilerplate for each test device to just the TEST_MACRO and the LITEST_foo device enum entry. It also now automates the shortname of the device. The device's shortname was standardised in this approach as well, lowercase and dashes only. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-20tablet: support tablet devices without BTN_TOOL_PENPeter Hutterer1-0/+1
Some devices like the UC Logic WP5540U has BTN_STYLUS but not BTN_TOOL_PEN. While a kernel bug, let's just handle these correctly anyway. https://bugs.freedesktop.org/show_bug.cgi?id=102570 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Yay-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-09-06Add support for SW_TABLET_MODEPeter Hutterer1-0/+1
https://bugs.freedesktop.org/show_bug.cgi?id=101008 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-06evdev: move lid code to the fallback interfacePeter Hutterer1-1/+0
This was originally designed to deal with devices that only have SW_LID. But it can be moved into the evdev interface to avoid duplication once we have SW_TABLET_MODE. The original assumption of the lid switch device being a standalone device with no other switches is not true, having a separate dispatch hurts us here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-04test: rename test-lid.c to test-switch.cPeter Hutterer1-1/+1
So we can add other switch tests to it without confusing too many people. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-28evdev: accept accelerometers if they are tagged as other devices tooPeter Hutterer1-0/+1
Devices tagged as accelerometers may also be other devices like tablet pads. Only ignore pure accelerometer devices but disable the accelerometer axes for devices that have multiple types. https://bugs.freedesktop.org/show_bug.cgi?id=102100 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
2017-08-23Add support for LIBINPUT_IGNORE_DEVICEPeter Hutterer1-0/+1
The recommended way to have libinput ignore specific devices so far was to remove the ID_INPUT* properties from the device. That may also affect other pieces of the stack that need access to this device. For the niche case of a device that should only be ignored by libinput but otherwise be treated normally by the system, we now support the LIBINPUT_IGNORE_DEVICE property. If the property is set to "0", it's equivalent to being unset. This gets around some technical limitations in udev where unsetting a property is impossible via a hwdb entry. https://bugs.freedesktop.org/show_bug.cgi?id=102229 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-21build: Add -Iinclude to unit testsPhilip Withnall1-5/+5
It seems the unit tests rely on another part of <linux/input.h> which I missed in the previous commit (5cf4b35b). Signed-off-by: Philip Withnall <withnall@endlessm.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-08-18build: Add -Iinclude to libinput and its toolsPhilip Withnall1-14/+19
Various files use #include <linux/input.h> and, if the system input.h is too old, will fail to compile. Use the internal copy by adding -Iinclude to the build command lines. This was the case in the old autotools build system. Signed-off-by: Philip Withnall <withnall@endlessm.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-27lid: disable all types but EV_SYN and EV_SWPeter Hutterer1-0/+1
The lid dispatch interface is a one-trick pony and can only handle SW_LID. It ignores other switches but crashes on any event type other than EV_SW and EV_SYN. Disable those types so we just ignore the event instead of asserting. https://bugs.freedesktop.org/show_bug.cgi?id=101853 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
2017-07-26pointer: add button debouncingPeter Hutterer1-0/+1
Some devices have worn-out switches or just cheap switches that trigger multiple button events for each press. These can be identified by unfeasably short time deltas between the release and the next press event. In the recordings I've seen so far, that timeout is 8ms. We have a two-stage behavior: by default, we do not delay any events but we monitor timestamps. The first time a bouncing button is detected we switch to debounce mode. From then on, release events are delayed slightly to check for subsequent button events. If one occurs, the releas and press are filtered. If none occurs, the release event is passed to the caller. https://bugs.freedesktop.org/show_bug.cgi?id=100057 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-20tools: add a command to analyze trackpointsPeter Hutterer1-0/+9
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>
2017-07-14Merge branch 'wip/touchpad-apple-touch-major-v2'Peter Hutterer1-0/+8
2017-07-12Add safe_strdup()Peter Hutterer1-0/+2
Return value is either NULL or a strdup'd string, depending on the input value. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>