Commit graph

570 commits

Author SHA1 Message Date
Peter Hutterer
a9b3deb60f test: disable coredumps during test suite runs
It's a test suite, it shouldn't fill up the file system or the journal with
coredumps.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-05-09 08:12:43 +10:00
Peter Hutterer
78322a9b45 libevdev 1.5.7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-04 10:35:01 +10:00
Peter Hutterer
abfb307e18 Fix an indentation issues
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-25 09:27:16 +10:00
Peter Hutterer
0b482b5f11 doc: add links to git repositories on the main page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-24 14:42:00 +10:00
Mihail Konev
e7955544fe autogen: add default patch prefix
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26 14:25:02 +10:00
Peter Hutterer
b13d67af9b autogen.sh: use exec for configure
No point in waiting around until it finishes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-26 14:23:18 +10:00
Peter Hutterer
a072277ba9 autogen.sh: escape $srcdir before configure
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-26 14:22:34 +10:00
Peter Hutterer
1ec01b1310 tools: print an error if we don't have any matching events in the dpi tool
Beats crashing by dereferencing a null-pointer (when we access
m->frequencies[idx])

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-01-17 14:50:29 +10:00
Peter Hutterer
a155a977b7 tools: move udev printf into the print_summary() helper
No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-01-17 14:42:13 +10:00
Peter Hutterer
24dafff909 configure.ac: enable subdir-objects
The main thing holding us back here was our gcov hacks. We used to rebuild the
libevdev sources locally inside test/ with the gcov flags so that we could
leave the main libevdev sources untouched. This doesn't work well with
subdir-objects - we have to link to libevdev.la instead.

To enable gcov, we now have to apply the gcov flags to the main library
object. But this also means that when running, the notes files will be
somewhere within the libevdev/ directory, not the test/ directory. Working
around this in automake gets nasty quickly, so just add a script that knows
how to search for things.

No functional changes unless --enable-gcov is given at configure time - then
don't install the library.

The gcov reports are now in test/gcov-reports/

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-01-09 09:40:28 +10:00
Peter Hutterer
1ee17e18ac test: fix a Makefile.am comment
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-06 11:28:58 +10:00
Peter Hutterer
d447a75e9e libevdev 1.5.6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-04 13:04:58 +10:00
Nayan Deshmukh
f7188aabc9 Fix typos in Documentation
Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-03 07:43:41 +10:00
Peter Hutterer
8a47a03044 include: update to v4.9 linux/input.h headers
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-12-12 10:07:07 +10:00
Peter Hutterer
452847a314 libevdev 1.5.5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-12-01 07:55:25 +10:00
Peter Hutterer
b261868b0a Disable test runs on make distcheck
The tests all need root, but running distcheck as root is not ideal. Disable
the test runs (but not the build) to make it easier to verify distcheck works
as intended.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-11-30 20:34:46 +10:00
Nathan Baker
e938e0b959 Fix minor error in doxygen example code
The incorrect variable was checked as a return code in an example, and
that can be confusing for people trying to learn or use the example code
as a starting point.
2016-11-14 07:10:02 +10:00
Peter Hutterer
61f0a0f9ad tools: print the mean frequency together with the max frequency
And if they're 30% out, print a warning. On the ThinkPad X1 Wireless Touch
Mouse (when connected via bluetooth) we get a bunch of events at the start of
the movement, all less than 1ms apart. Best guess is that the device goes to
low-power, then notices the movement and buffers the event until the BT
connection is back up. Then it sends all events at once. Usually they're less
than 1ms apart, but at one recording showed a 37ms delay before we go back to
the normal 70ms (~15Hz) the mouse has otherwise.

This is unpredictable enough that we can't just work around it so instead
print a warning to the user so they can go investigate.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-09-21 16:57:29 +10:00
Peter Hutterer
55c43b19cf tools: rename frequency to max_frequency in the dpi tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-19 10:55:51 +10:00
Peter Hutterer
94385480ff tools: use uint64_t, not doubles for the µs parameters
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-16 07:26:42 +10:00
Peter Hutterer
2a612997ab tools: fix kernel-announced width/height
Side-effect of 240ba34ebd was that "touchpad size as listed by the kernel"
was now dependent on the values we got. This one is a static one based on the
axis info.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-15 11:57:52 +10:00
Peter Hutterer
d05736765c doc: drop the HTML_TIMESTAMP
Allows for reproducible builds. Debian carries a patch for this, and the
timestamp doesn't really add much since the doc is either in sync with master
or represents the release tag. Might as well drop it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-29 08:00:49 +10:00
Peter Hutterer
0f346f3090 libevdev 1.5.4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-26 12:01:34 +10:00
Peter Hutterer
240ba34ebd tools: fix the touchpad resolution calculation
Previous ones used the absinfo from the kernel but since we never updated that
from within the tool, the output was always the same.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-26 11:43:54 +10:00
Peter Hutterer
0a5f884c58 libevdev 1.5.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-22 07:36:13 +10:00
Peter Hutterer
df5ca55609 Don't bother sanitizing disabled event codes
Filter them immediately instead of passing them on and relying on the actual
event handling code to filter them.

Reproducer: if EV_ABS is disabled on an Apple MagicMouse we still get events
passed into sanitize_event(). But the code handling EV_ABS events doesn't
update the state, so we end up complaining about double tracking IDs, even
though that is not actually correct.

https://bugzilla.redhat.com/show_bug.cgi?id=1361325

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-08-17 17:43:32 +10:00
Peter Hutterer
761687e995 tools: require a minimum size for touchpads
This mostly aims to catch users trying to specify the size in inches.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-01 07:47:46 +10:00
Peter Hutterer
911106230a tools: change touchpad-edge-detector to require physical size
Almost no-one does the calculations for me to update the udev rules (and some
rules were submitted with the <x resolution> placeholders left in).
Require the user to specify the physical size so we just copy/paste the actual
udev rule.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-08-01 06:48:04 +10:00
Peter Hutterer
4dd93f0108 libevdev 1.5.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-15 16:11:41 +10:00
Peter Hutterer
7f2fffc0d9 include: update to v4.6 linux/input.h header
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-16 09:51:55 +10:00
Peter Hutterer
98fd794693 libevdev 1.5.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-16 09:01:35 +10:00
Armin K
e628bb938b libevdev: Properly distribute uinput.h
Signed-off-by: Armin K <krejzi@email.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-16 08:12:05 +10:00
Peter Hutterer
52d52f320c libevdev 1.5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-13 13:50:44 +10:00
Peter Hutterer
4943f2895f tools: allow numeric axis values in tweak-device
Not all axes a device may have are assigned a semantic name.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-22 10:10:39 +10:00
Peter Hutterer
a95ca2c821 tools: fix tweak-device option parsing
https://bugs.freedesktop.org/show_bug.cgi?id=92880

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-22 09:45:22 +10:00
Peter Hutterer
e11662ac72 doc: reduce doxygen file to the non-default settings
Makes it easier to check what we changed from the defaults.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-22 08:32:10 +10:00
Peter Hutterer
60188f1c4d Fix typo in doc string
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-20 11:31:38 +10:00
Peter Hutterer
0b92e1ae5e uinput: support the new UI_DEV_SETUP/UI_ABS_SETUP ioctls
Available in kernel 4.5 and later (uinput version 5), these ioctls allow us to
set the absinfo correctly, i.e. including the resolution.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-04-07 11:06:19 +10:00
Peter Hutterer
7989eef759 uinput: split uinput device creation into a helper function
No functional changes. This is prep work for supporting the new
UIDEV_DEV_SETUP ioctl.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-04-07 11:05:00 +10:00
Peter Hutterer
345a1589a5 uinput: drop an unused argument
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-04-07 11:04:59 +10:00
Peter Hutterer
97fb972e41 include: update to v4.5 linux/uinput.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-04-07 10:43:11 +10:00
Peter Hutterer
5ea0a27ba6 Add parsing linux/input-event-codes.h, update to kernel v4.5
The kernel has split most of the event codes out to a new header but the FF_
bits are missing from that header. Until this is fixed upstream, change the
event code parsing so it can take two files (using cat and stdin) so we can
update the kernel headers again.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-03-30 15:45:58 +10:00
Peter Hutterer
46b8381f0c test: ignore a failure to UI_DEV_DESTROY the device
Coverity complains about it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-03-04 07:26:53 +10:00
Peter Hutterer
2a27abf824 test: drop unnecessary return value
We abort if anything goes wrong anyway, so we never returned anything but
success.

Found by coverity.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-03-04 07:10:33 +10:00
Peter Hutterer
bf8e6b2982 libevdev 1.4.6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-05 12:41:59 +10:00
Peter Hutterer
006f10cfcb uinput: fix race condition in uinput syspath check
In theory, the device could change between stat() call and open(), resulting
in us opening the new device. Change to open() first, then fstat() on the fd.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2016-01-04 07:39:24 +10:00
Peter Hutterer
3c85fcb62f tools: shut up coverity about a potential close(-1)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-04 07:39:24 +10:00
Peter Hutterer
5b13ffb78f tools: fix coverty "may be used uninitialized" warnings
tools/libevdev-tweak-device.c:390: uninit_use_in_call: Using uninitialized
value "changes" when calling "parse_options_abs".

tools/libevdev-tweak-device.c:376: warning: 'led' may be used uninitialized in
this function

tools/libevdev-tweak-device.c:375: warning: 'axis' may be used uninitialized
in this function

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-04 07:39:24 +10:00
Peter Hutterer
cabe03d8fe Document that the fd should be drained before libevdev_set_fd
This is the caller's responsibility, for two reasons:
* we don't know if O_NONBLOCK is set, so draining the fd isn't a simple matter
  of read() until EAGAIN. A select() + read() could work around this of
  course.
* for stateless information, keys and relative data, it is not a problem when
  there are events waiting on the fd already, they are processed correctly,
  albeit with a delay.

So punt this decision to the caller, they openend the fd, they know if they
care about delayed events, they can drain the fd before handing it to us.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
2015-12-17 10:46:31 +10:00
Peter Hutterer
de23fa00e7 libevdev 1.4.5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-11 12:11:48 +10:00