Peter Hutterer [Fri, 4 Apr 2014 00:04:56 +0000 (10:04 +1000)]
test: restore default log priority after tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 7 Apr 2014 04:26:31 +0000 (14:26 +1000)]
Split the SYN_DROPPED page into a few sections
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 7 Apr 2014 04:21:27 +0000 (14:21 +1000)]
Fix a typo, add a @ref in the documentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 1 Apr 2014 07:01:39 +0000 (17:01 +1000)]
Drop invalid ABS_MT_TRACKING_ID changes
Follow-up to
commit
41334b5b40cd5456f5f584b55d8888aaafa1f26e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Mar 6 11:54:00 2014 +1000
If the tracking ID changes during SYN_DROPPED, terminate the touch first
In normal mode, we may get double tracking ID events in the same slot, but
only if we either have a user-generated event sequence (uinput) or a malicious
device that tries to send data on a slot > dev->num_slots.
Since the client is unlikely to be able to handle these events, discard the
ABS_MT_TRACKING_ID completely. This is a bug somewhere in the stack, so
complain and hobble on along.
Note: the kernel doesn't allow that, but we cap to num_slots anyway, see
66fee1bec4c4b021e1b54adcd775cf6e2aa84869.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 1 Apr 2014 05:40:09 +0000 (15:40 +1000)]
Move slot-related initialization down
No real effects, but improves readability
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 1 Apr 2014 05:32:46 +0000 (15:32 +1000)]
Drop hardcoded MAX_SLOTS in favour of pre-allocated memory
We can't allocate in sync_mt_state since it may be called in the signal
handler. So pre-allocate based on the device's number of slots, store that in
the libevdev struct and use it for the sync process.
This fixes a remaining bug with the handling of ABS_MT_TRACKING_ID. If a
device had > MAX_SLOTS and a slot above that limit would start or stop during
a SYN_DROPPED event, the slot would not be synced, and a subsequent touch in
that slot may double-terminate or double-open a touchpoint in the client.
For the effects of that see
commit
41334b5b40cd5456f5f584b55d8888aaafa1f26e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Mar 6 11:54:00 2014 +1000
If the tracking ID changes during SYN_DROPPED, terminate the touch first
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 1 Apr 2014 05:12:56 +0000 (15:12 +1000)]
Only sync the initial MT state for Protocol B devices
For protocol A devices we won't get the information from the kernel anyway and
we expect all axes to be updated in the next event.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Wed, 2 Apr 2014 01:57:41 +0000 (11:57 +1000)]
Drop unnecessary memset
The EVICOCGMTSLOTS ioctl returns all slot values for the requested code or an
error code, it doesn't return the number of bytes successfully transferred.
Thus all values in the input array are always defined (on success), we don't
need to memset it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Wed, 2 Apr 2014 01:48:14 +0000 (11:48 +1000)]
Use libevdev_reset from libevdev_free
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 1 Apr 2014 06:59:46 +0000 (16:59 +1000)]
Add quote around device name during error message
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 2 Apr 2014 01:12:42 +0000 (11:12 +1000)]
test: remove checks for test device creation failure
test_create_... fails on a non-zero return code anyway
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 2 Apr 2014 01:24:27 +0000 (11:24 +1000)]
test: the kernel test build doesn't need to link to libevdev
We statically compile libevdev in anyway through $(common_sources)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 2 Apr 2014 01:31:59 +0000 (11:31 +1000)]
test: fix kernel test for revoke after
dev2 by definition doesn't initialize, we expect it to fail. Freeing it after
is a bad idea. Also initialize it to NULL so this is a bit more obvious now.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 1 Apr 2014 06:31:41 +0000 (16:31 +1000)]
test: fix the tracking_id sync test
A max of num_slots -1 caused the first MT_SLOT event to be skipped, leading to
wrong tracking IDs in the slots.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 1 Apr 2014 04:02:41 +0000 (14:02 +1000)]
Fix indentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 25 Mar 2014 06:20:24 +0000 (16:20 +1000)]
libevdev 1.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 19 Mar 2014 04:04:59 +0000 (14:04 +1000)]
Add documentation for axis updates without a tracking ID
If a touch starts and terminates while in SYN_DROPPED, the tracking ID appears
to stay at -1, but the other axes may update. We need to pass these on to the
client since the kernel may buffer the next event with the same value
otherwise. Note this in the documentation so that client's don't create touch
points based on out-of-touchpoint updates.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Wed, 19 Mar 2014 00:30:02 +0000 (10:30 +1000)]
libevdev 1.1RC2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 19 Mar 2014 00:29:51 +0000 (10:29 +1000)]
Bump library revision
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 18 Mar 2014 03:55:21 +0000 (13:55 +1000)]
uinput: check for asprintf failure
This doesn't really do much here, but strictly speaking: if asprintf returns
-1, devnode is undefined. So reset it to NULL to avoid weird pointers. And
also free the rest of the names if we ever have more than one device - which
also shouldn't happen.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 18 Mar 2014 03:58:18 +0000 (13:58 +1000)]
test: shut up compiler warning
test-libevdev-events.c: In function ‘test_double_syn_dropped_event’:
test-libevdev-events.c:187:2: warning: ignoring return value of ‘read’,
declared with attribute warn_unused_result [-Wunused-result]
This read was there to drain events even when there shouldn't be any on the
pipe anyway. So let's add an assert.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 18 Mar 2014 04:00:07 +0000 (14:00 +1000)]
Shut up another warning
Triggered with -O3
../libevdev/libevdev.c: In function ‘libevdev_get_event_value’:
../libevdev/libevdev.c:1112:6: warning: ‘value’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 18 Mar 2014 03:44:39 +0000 (13:44 +1000)]
Shut up compiler warning
Triggered with -O
../libevdev/libevdev.c: In function ‘libevdev_has_event_code’:
../libevdev/libevdev-util.h:58:20: warning: ‘mask’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
Optimisation clearly shuffles things around here: in the code, if no max is
found, we return -1 and bail out before we access mask.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 17 Mar 2014 06:08:36 +0000 (16:08 +1000)]
Sanitize events when we're skipping sync as well
If a client doesn't sync expliciltly, make sure we sanitize the events when we
update the internal library state.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 18 Mar 2014 05:11:39 +0000 (15:11 +1000)]
add a linebreak for correct rendering of the documentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 Mar 2014 00:57:15 +0000 (10:57 +1000)]
doc: move the section for the internal test suite down
"Related Pages" in doxygen are ordered in the order they appear in the source
file. The internal test suite is least likely to be of interest to the
reader, so move it to the bottom.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 11 Mar 2014 00:56:10 +0000 (10:56 +1000)]
doc: include linux/input.h verbatim in the documentation
This makes it easier to look up what specific version libevdev was compiled
against.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 11 Mar 2014 00:44:10 +0000 (10:44 +1000)]
doc: Add documentation on how SYN_DROPPED is handled
This is getting a bit complex, so add some high-level documentation that we at
least know what we're trying to do.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 10 Mar 2014 23:19:18 +0000 (09:19 +1000)]
configure: add link to our wiki page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Mon, 10 Mar 2014 22:21:49 +0000 (08:21 +1000)]
libevdev 1.1RC1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 10 Mar 2014 22:30:29 +0000 (08:30 +1000)]
test: fix distcheck
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 6 Mar 2014 02:38:47 +0000 (12:38 +1000)]
Add a documentation note to update the slot after syncing
Clients may not care about the events generated during SYN_DROPPED, but the
current slot must be updated to avoid a client being out-of-date.
Same with tracking IDs, if they changed, the caller will likely have to update
some internal states.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 6 Mar 2014 01:54:00 +0000 (11:54 +1000)]
If the tracking ID changes during SYN_DROPPED, terminate the touch first
Most clients can't deal with tracking ID changes unless a -1 is sent first. So
if we notice that the tracking ID has changed during the sync process, send a
set of ABS_MT_TRACKING_ID -1 events for each of those, then send the rest of
the events.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Benjamin Tissoires [Wed, 5 Mar 2014 02:03:57 +0000 (12:03 +1000)]
Send an extra ABS_MT_SLOT event to sync the client up with the current slot
If multiple slots have changed during the sync handling, the client must be
re-set to the current slot before continuing with normal events.
Signed-off-by: Benjamin Tissoires <btissoir@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Wed, 5 Mar 2014 03:15:20 +0000 (13:15 +1000)]
Don't sync the MT state for fake MT devices
Devices with ABS_MT_SLOT-1 are fake MT devices, they merely overlap the
axis range but don't actually provide slots. The EVIOCGABS ioctl won't work to
retrieve the current value - the kernel does not store values for those axes
and the return value is always 0.
Thus, simply ignore those axes for fake MT devices and instead rely on the
next event to update the caller with the correct state for each axis.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 6 Mar 2014 00:22:20 +0000 (10:22 +1000)]
Move some functions/macros between libevdev-int.h and libevdev-util.h
This allows libevdev-util.h to be used by tests, it no longer relies on
libevdev internal structs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Wed, 5 Mar 2014 00:57:01 +0000 (10:57 +1000)]
Cap slot values to the announced maximum
A malicious device may announce N slots but then send a slot index >= N. The
slot state is almost always allocated (definitely the case in libevdev and
true for most callers), so providing a slot number higher than the announced
maximum is likely to lead to invalid dereferences. Don't allow that.
Likewise, don't allow negative slot numbers.
Note that the kernel filters these events anyway, the only way to trigger this
is to change the device fd to something outside the kernel's control.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 27 Feb 2014 06:52:51 +0000 (16:52 +1000)]
test: add two more checks for the current slot
When syncing, we expect the slot to stay the same until the client has
processed the events. This already worked, just add a check to make sure.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 27 Feb 2014 04:35:35 +0000 (14:35 +1000)]
Increase MAX_SLOTS to 60
As seen on 3M devices, which seems to be the maximum seen so far. Some Stantum
devices report 255 touches but are only capable of 10, so the are not affected
by our limits.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 27 Feb 2014 04:27:59 +0000 (14:27 +1000)]
test: add a test for > MAX_SLOTS mt values
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 27 Feb 2014 03:10:35 +0000 (13:10 +1000)]
Reduce memory requirement for MT syncing
Changes the algorithm: before we'd ioctl all axes for all slots, then generate
events for all slots one-by-one.
Now we ioctl the slot state for each axis, copy the new event value into
the device and mark a bitfield that we've updated the value. Then loop through
the slots and generate events where changed.
Side-effect: this makes it easy to check if anything in the slot has updated,
so we can skip empty slot events during sync.
Min memory requirement for the state storage was:
MAX_SLOTS * (ABS_MT_CNT + 1) * sizeof(int) = 1980
Min memory requirement now:
(ABS_MT_CNT + 1) * sizeof(int) + NLONGS((MAX_SLOTS * ABS_MT_CNT) bits) = 544
This is sigsafe code, so this was stack memory. Reducing the requirement
allows us to up MAX_SLOTS in the future if we need to.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 27 Feb 2014 01:34:47 +0000 (11:34 +1000)]
Dynamically allocate the slot values
Instead of relying on a static MAX_SLOTS array, allocated it based on the
number of slots we have on the device. The previous checks for MAX_SLOTS were
incomplete, causing out-of-bound reads.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 27 Feb 2014 01:36:04 +0000 (11:36 +1000)]
Don't sync past MAX_SLOTS slots
If a device has more than MAX_SLOTS slots, we'd run out-of-bounds on the sync
array. This function is sig-safe, so we can't alloc here, merely limit the
access.
Reported-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 4 Mar 2014 06:59:50 +0000 (16:59 +1000)]
Add unlikely() macro
Taken from systemd.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 4 Mar 2014 03:31:22 +0000 (13:31 +1000)]
Fix a wrong reference in the libevdev_next_event documentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 4 Mar 2014 03:29:27 +0000 (13:29 +1000)]
Document the FORCE_SYNC behavior a bit better
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 5 Mar 2014 02:57:18 +0000 (12:57 +1000)]
test: whitespace fixes (newlines)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 27 Feb 2014 01:29:19 +0000 (11:29 +1000)]
Fix memory leaks when failing to create a uinput device
For an invalid fd, or a failure to open the device, the pre-allocated uinput
device struct would leak.
We can drop the open_uinput() function now, since skipping to the error
handling means we'll return -errno anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 27 Feb 2014 01:22:27 +0000 (11:22 +1000)]
Plug a memory leak for name, uniq, phys
If a device is assigned a name, uniq and/or phys before calling
libevdev_set_fd(), those values would leak.
Change the default alloc to calloc, so name, uniq, and phys are initialized to
zero before we call libevdev_reset
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 27 Feb 2014 01:13:53 +0000 (11:13 +1000)]
test: plug more memory leaks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 27 Feb 2014 01:08:51 +0000 (11:08 +1000)]
test: fix memleak when using the test-uinput device
The libevdev-created uinput device was never freed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Emmanuele Bassi [Tue, 25 Feb 2014 10:48:49 +0000 (10:48 +0000)]
tools: Fix compiler warning
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Emmanuele Bassi [Tue, 25 Feb 2014 10:48:48 +0000 (10:48 +0000)]
Fix the include directives when building in tools/
We need to add top_srcdir to fix the build when srcdir != builddir.
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 8 Oct 2013 05:43:50 +0000 (15:43 +1000)]
Add a test for EVIOCREVOKE
New in 3.12, EVIOCREVOKE revokes access to an evdev device. This is unlikely
to be used by a libevdev user, see.
http://lists.freedesktop.org/archives/input-tools/2014-January/000688.html
This patch adds a new test-kernel binary that tests the kernel API directly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Peter Hutterer [Mon, 24 Feb 2014 00:55:53 +0000 (10:55 +1000)]
Document that the return value of get_name|uniq|phys is not permanent
It's a pointer to the copy libevdev has, but that copy may be freed by the
caller if someone calls e.g. libevdev_set_name()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 20 Feb 2014 04:40:32 +0000 (14:40 +1000)]
tools: add a tool to print the actual range provided by a touchpad
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 24 Feb 2014 23:44:35 +0000 (09:44 +1000)]
Replace hardcoded 0 with the enum for it
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 25 Feb 2014 00:06:21 +0000 (10:06 +1000)]
test: remove a bunch of superfluous empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 18 Feb 2014 04:46:40 +0000 (14:46 +1000)]
libevdev 1.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Feb 2014 04:54:13 +0000 (14:54 +1000)]
Actually filter by log priority
If a message is higher than the current priority, filter it. And add a few
tests that the priority is handled the way it should.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Peter Hutterer [Wed, 12 Feb 2014 05:44:33 +0000 (15:44 +1000)]
Use 0 instead of "zero"
We're a bit inconsistent here anyway because of the ample use of "non-zero"
which can't really be converted to non-0. But let's at least be consistent
with the use of 0 instead of zero.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Feb 2014 05:28:34 +0000 (15:28 +1000)]
More documentation fixes and improvements
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 12 Feb 2014 05:21:42 +0000 (15:21 +1000)]
Mark a few more functions as signal-safe
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 Feb 2014 06:31:35 +0000 (16:31 +1000)]
Improve the documentation a bit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 Feb 2014 06:37:14 +0000 (16:37 +1000)]
Document that we don't support EVIOCREVOKE
This is intentional, see
http://lists.freedesktop.org/archives/input-tools/2014-January/000688.html
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 11 Feb 2014 06:27:50 +0000 (16:27 +1000)]
README: remove the warning, it's stable now
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 29 Jan 2014 05:09:05 +0000 (15:09 +1000)]
libevdev 0.9.1
libevdev 1.0-rc1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 29 Jan 2014 05:08:12 +0000 (15:08 +1000)]
test: remove NULL test for SW_MAX, 3.13 defines SW_MUTE_DEVICE
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 2 Jan 2014 23:44:13 +0000 (09:44 +1000)]
Bump soname
Bump once to the stable interface we have now. This isn't really required as
we're compatible with everything but functions deprecated with 0.4 but we
might as well do it now to force a rebuild of everyone. Should've done that
for 0.6 when we actually dropped the function, but ...
Now that we have proper library versioning we shouldn't need any
backwards-incompatible soname bumps for a while.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
David Herrmann [Sat, 17 Aug 2013 11:58:15 +0000 (13:58 +0200)]
Add ld version-script
Explicit symbol versioning allows us to provide multiple versions of
incompatible API changes. It is a very common practice in GNU world and
avoids the problems occuring if distributions try to ship multiple version
of a single DSO.
Background information available at:
http://people.redhat.com/drepper/dsohowto.pdf
To see the symbol-versions, use objdump:
objdump -T libevdev/.libs/libevdev.so.1.0.0
This can also be used to verify that all symbols are correctly
exported (typos in linker-scripts are silently ignored by ld).
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Updated for evdev 0.6's API.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 21 Jan 2014 22:27:31 +0000 (08:27 +1000)]
include: update linux/input.h for kernel 3.13
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 17 Jan 2014 00:15:33 +0000 (10:15 +1000)]
Warn about a SYN_DROPPED right after finishing a sync
If the first event after a completed device sync is a SYN_DROPPED, warn the
user that they're not fast enough handling this device.
The test for this is rather complicated since we can't write SYN_DROPPED
through uinput so we have to juggle the device fd and a pipe and switch
between the two at the right time (taking into account that libevdev will read
events from the fd whenever it can).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 17 Jan 2014 00:21:48 +0000 (10:21 +1000)]
test: abort on unexpected log messages
Add two log functions, one that aborts on a received message. We know when we
expect to receive an error, so anytime this happens unexpectedly should
terminate the test.
And for those tests do issue a log message, let them ignore it and don't
print anything.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 16 Jan 2014 23:24:20 +0000 (09:24 +1000)]
Count the number of events needed for a full sync
Make sure we have a queue that is at least large enough to do a full sync
after a SYN_DROPPED, plus store a few extra events in case some came in after
the sync.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Peter Hutterer [Thu, 16 Jan 2014 23:47:39 +0000 (09:47 +1000)]
test: fix typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 16 Jan 2014 23:46:09 +0000 (09:46 +1000)]
test: rename a test to match what it's testing better
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 14 Jan 2014 04:18:06 +0000 (14:18 +1000)]
Drop the argparse requirement for make-event-names.py
We only take one option (path to linux/input.h) anyway so drop the argparse
requirement. This way libevdev builds on RHEL6 too which doesn't ship
argparse.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 14 Jan 2014 04:08:29 +0000 (14:08 +1000)]
Drop --output flag and python generation code from make-event-names.py
This is a leftover from when the file was in evemu and used to generate python
headers too.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Wed, 8 Jan 2014 00:52:31 +0000 (10:52 +1000)]
include: update linux/input.h for kernel 3.12
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Peter Hutterer [Mon, 23 Dec 2013 22:19:16 +0000 (08:19 +1000)]
test: detect if we're running inside gdb and disable forking
The Check test framework forks by default which is annoying when running gdb.
Try to detect whether we're inside gdb by ptracing ourselves. If that works,
we're not inside a debugger. If it doesn't, then assume we're inside a
debugger and set CK_FORK to "no".
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 23 Dec 2013 23:12:13 +0000 (09:12 +1000)]
Documentation rewordings and additions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 23 Dec 2013 23:11:55 +0000 (09:11 +1000)]
Documentation typo fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 23 Dec 2013 23:10:47 +0000 (09:10 +1000)]
Add more cross-references
doxygen doesn't detect enum cross-references automatically, prefix them with
@ref
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 23 Dec 2013 22:07:00 +0000 (08:07 +1000)]
doc: remove initial * from example code lines
doxygen actually copies that over into the resulting output.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 23 Dec 2013 07:38:07 +0000 (17:38 +1000)]
libevdev 0.6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 12 Dec 2013 03:13:54 +0000 (13:13 +1000)]
test: add basic link test
This test doesn't do anything but compile and link against libevdev. It's a
simple protection to avoid linker errors. If we ever have libs we depend on
and they don't get resolved properly, this test should warn us in time.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 12 Dec 2013 02:57:21 +0000 (12:57 +1000)]
test: split tests into run-time and build-time tests
The build-time tests don't do anything, we don't need to run them.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 20 Nov 2013 01:58:08 +0000 (11:58 +1000)]
Don't treat devices with (ABS_MT_SLOT - 1) as multitouch devices
Some devices (PS3 sixaxis controller) merely have a bunch of axes, without the
semantic information that linux/input.h requires. For those, the ABS_MT range
may be merely another axis, not the special range that we need to treat it
with.
Use a simple heuristic: if ABS_MT_SLOT - 1 is enabled, don't treat ABS_MT as
multitouch axes. The ABS_MT_SLOT - 1 axis is not used for a real axis.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Peter Hutterer [Sun, 8 Dec 2013 23:49:43 +0000 (09:49 +1000)]
Merge branch 'ev-rep-handling'
Peter Hutterer [Fri, 6 Dec 2013 02:44:33 +0000 (12:44 +1000)]
State that the event is defined for a SYN_DROPPED
All clients that want to handle SYN_DROPPED correctly need to pass an EV_SYN
through their own handlers before starting with the syn events. Rather than
letting them synthesize that, guarantee that the event is defined the first
time LIBEVDEV_READ_STATUS_SYNC is returned.
This does not change existing behavior, it merely documents it so we can rely
on it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 4 Dec 2013 10:21:09 +0000 (20:21 +1000)]
Support EV_REP values through libevdev_get_event_value
We shouldn't have a separate API for that, the whole point of libevdev is to
abstract the quirkyness of the ioctls into a common interface. So let's
export the two EV_REP values through libevdev_get_event_value.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Peter Hutterer [Wed, 4 Dec 2013 10:15:28 +0000 (20:15 +1000)]
Constify libevdev_get_repeat
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 4 Dec 2013 09:50:06 +0000 (19:50 +1000)]
Move the testing part to a separate page
Not something that interests the average visitor of the front page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 4 Dec 2013 09:48:43 +0000 (19:48 +1000)]
Add a doxygen page listing the ioctls and their current support
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Peter Hutterer [Sun, 8 Dec 2013 22:42:17 +0000 (08:42 +1000)]
doc: add a placeholder man page
We don't provide man pages (the ones created by doxygen are pretty
terrible) so provide a placeholder page to provide the minimum info and point
people in the right direction.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 4 Dec 2013 10:03:24 +0000 (20:03 +1000)]
Documentation fix, refer to correct function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 4 Dec 2013 09:46:50 +0000 (19:46 +1000)]
Fix a typo in the documentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
David Herrmann [Mon, 4 Nov 2013 14:43:57 +0000 (15:43 +0100)]
build: set aux-dir
If we don't set AUX_DIR, I get errors during ./configure:
/bin/sh: /home/david/missing: No such file or directory
configure: WARNING: 'missing' script is too old or missing
This error is ignored by default, but may cause failures with newer
autoconf versions. Simply set the AUX_DIR to "build-aux" like many other
autotools projects do.
[This is an automake 1.14 bug, see the upstream report:
http://lists.gnu.org/archive/html/bug-automake/2013-11/msg00007.html]
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 28 Nov 2013 07:50:36 +0000 (17:50 +1000)]
Drop some leftover deprecated constants.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Gaetan Nadon [Mon, 25 Nov 2013 16:13:02 +0000 (11:13 -0500)]
test-compile-pedantic: replace -Wpedantic with -pedantic
-Wpedantic is a relatively new option, with -pedantic being the old version of
it that works on older gcc versions too.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>