JengHyun Kang [Fri, 9 Dec 2016 02:51:58 +0000 (11:51 +0900)]
Ignore joystick devices if LIBINPUT_IGNORE_JOYSTICK env is 1
Change-Id: I56d9cc833acad212e3d8071a79adf27bc29c19ca
Gwanglim Lee [Tue, 23 Aug 2016 02:16:18 +0000 (11:16 +0900)]
evdev: fix a warning.
fd should have initialized value.
Change-Id: I699f8c714210d59aef57bf715ded91739bf1342a
JengHyun Kang [Mon, 22 Aug 2016 07:54:29 +0000 (16:54 +0900)]
evdev: Do not open the already opened device
Change-Id: I96ba5287f28dfa301628232a5a6a02f1baf1c7a2
Lisa kim [Fri, 29 Jul 2016 06:55:54 +0000 (15:55 +0900)]
Set receive buffer size from UDEV_MONITOR_BUFFER_SIZE env
Change-Id: I6adaa345ad4df6f1c3c26811b569cb0998bf0bc8
Signed-off-by: Lisa kim <hj0530.kim@samsung.com>
JengHyun Kang [Tue, 12 Jul 2016 08:52:27 +0000 (17:52 +0900)]
Call a input_set_default_property() in evdev_device_create if this function is exist
Change-Id: Ib47c6115248204d9ff63ced802c557b1bf5ad5f5
JengHyun Kang [Tue, 12 Jul 2016 02:14:03 +0000 (11:14 +0900)]
svace: Modify a strerror function to strerror_r to gurantee threads safety.
Change-Id: Iacd31adb29bb284f93aa04597d5c6ca364e0616b
Duna Oh [Mon, 18 Apr 2016 13:56:59 +0000 (22:56 +0900)]
Add a device only when the device is not created by libinput_path
Signed-off-by: Duna Oh <duna.oh@samsung.com>
Change-Id: Ic9d444cbf0d8ab95293e3770a91e31e83f405d60
JengHyun Kang [Thu, 24 Mar 2016 11:50:02 +0000 (20:50 +0900)]
Add a new API to return wheel click angle value
Change-Id: Ic45f60fd95ab7835fa92064c9badb46fe9164695
Sung-Jin Park [Fri, 11 Mar 2016 02:50:46 +0000 (11:50 +0900)]
Apply directory macros
Change-Id: I9b419f585ef8b1832fcc114720fc572869771ce3
JengHyun Kang [Fri, 26 Feb 2016 08:40:45 +0000 (17:40 +0900)]
Modify a ttrace macro name TRACE_BEGIN to TRACE_INPUT_BEGIN
Change-Id: I2559a8156056fcbd359008e0da59615ff7270c7d
JengHyun Kang [Wed, 24 Feb 2016 05:03:27 +0000 (14:03 +0900)]
Remove unnecessary ttrace and add ttrace logs to another point
Change-Id: I21c3d60d357c46df968437e22f45dcf12455ff6c
JengHyun Kang [Thu, 11 Feb 2016 06:44:36 +0000 (15:44 +0900)]
Add ttrace
Change-Id: I82a316d226c967a396f6ce5671feeafbfb37bd0f
JengHyun Kang [Thu, 7 Jan 2016 08:23:24 +0000 (17:23 +0900)]
Add a patch for support extra touch events.
- libinput commit name: add orientation and size of touch point and pressure to the API
Change-Id: Icfd09c132b51bf15837f11bdd662181e666960b5
Mun, Gwan-gyeong [Tue, 4 Aug 2015 08:03:30 +0000 (17:03 +0900)]
Add manifest for security domain policy
Change-Id: I70e41f3e4ad12035ff513fc2a322bedbaf87dd49
Gwanglim Lee [Mon, 11 May 2015 05:27:56 +0000 (14:27 +0900)]
packaging: correct installation path of udev rule files on 64bit arch
Change-Id: I26ae6192c393516e18d72b1fedc0aa1c412f164b
Philippe Coval [Mon, 23 Feb 2015 09:05:08 +0000 (10:05 +0100)]
packaging: Bump to 0.11.0
Change-Id: I68ab7b18613657814e6535261ac85fad4019122a
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Manuel Bachmann [Sat, 14 Feb 2015 15:10:57 +0000 (16:10 +0100)]
packaging: Bump to 0.8.0
Change-Id: I661837a5368f60aeeb0760c1f419fd3c457faf31
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Philippe Coval [Tue, 4 Nov 2014 15:31:28 +0000 (16:31 +0100)]
packaging: Bump to 0.6.0
Change-Id: Id66ecfc8dec24521687a572b699d0606b29ff4dc
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Philippe Coval [Thu, 14 Aug 2014 12:46:53 +0000 (14:46 +0200)]
packaging: Bump to 0.5.0
Change-Id: Icc00f5164583a5657e7699a686c76e49698093f2
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Philippe Coval [Thu, 14 Aug 2014 12:46:23 +0000 (14:46 +0200)]
packaging: use upstream tags
Change-Id: Ia5af4a9a3294e3359dd67f635be1c0e97a416387
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Philippe Coval [Fri, 28 Feb 2014 15:46:59 +0000 (16:46 +0100)]
packaging: Initial packaging on 0.1.0 for Tizen
Change-Id: I682fc2715f9f8a60046c5c9297b7d96173131aeb
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Peter Hutterer [Sun, 22 Feb 2015 23:59:36 +0000 (09:59 +1000)]
configure.ac: libinput 0.11.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 23 Feb 2015 00:28:02 +0000 (10:28 +1000)]
doc: document udev device tagging
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 23 Feb 2015 00:26:56 +0000 (10:26 +1000)]
doc: add missing space
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 22 Feb 2015 23:01:08 +0000 (09:01 +1000)]
cosmetic: fix a whitespace issue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 18 Feb 2015 21:22:59 +0000 (07:22 +1000)]
test: fix Coverity complaints
seat_button_count
seat_key_count ... uninitialized variable
t = zalloc
s = zalloc ... dereferencing potential NULL-pointer
d->ntouches_down... side-effect in assertion
Coverity run against the 0.10.0 tag, see
https://scan.coverity.com/projects/4298
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Christian Hartmann <cornogle@googlemail.com>
Peter Hutterer [Thu, 19 Feb 2015 01:38:04 +0000 (11:38 +1000)]
cosmetic: drop double empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 18 Feb 2015 03:36:44 +0000 (13:36 +1000)]
udev: fix a race condition if a device disappears before we get a handle
If the device disappears too quickly, the device is NULL, the sysname is NULL
and that causes a segfault in strcmp.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 17 Feb 2015 21:43:03 +0000 (07:43 +1000)]
Rename noaccel to unaccel for consistency
No functional changes, this affects the declaration only.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 13 Feb 2015 01:40:19 +0000 (11:40 +1000)]
evdev: check the first parent of the event node for ID_INPUT tags
Bluetooth tablet devices' rules can't tag the event node directly, they can
only tag the first parent (the /sys/class/input/input1234 node). Check that
parent for tags too, lest we miss something important.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Benjamin Tissoires [Mon, 9 Feb 2015 23:45:45 +0000 (18:45 -0500)]
Use LIBINPUT_DEVICE_GROUP from udev as group identifier
Store it as identifier in the device group, any two devices that have a
the same non-NULL identifier share the group.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 10 Feb 2015 04:23:32 +0000 (14:23 +1000)]
Add udev bits to assign LIBINPUT_DEVICE_GROUP
The easiest way to get a device group is by looking at the phys path of the
input device (which looks like usb-0000:00:14.0-1/input1) and dropping the
/inputX bit. The rest is the same for devices that belong together (except on
the Cintiq 22HD Touch).
Ideally we could just take ATTRS{phys} but we can't select substrings to drop
into ENV so we need to do it ourselves. This patch adds a callout that takes a
syspath and prints the mangled path, to be used in LIBINPUT_DEVICE_GROUP.
The rule triggers on any device that has a non-zero phys attribute, this
groups devices like tablets together but also devices like mice with multiple
interfaces.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Tue, 10 Feb 2015 04:59:05 +0000 (14:59 +1000)]
tools: print the device group in event-debug
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Fri, 13 Feb 2015 04:36:56 +0000 (14:36 +1000)]
Add libinput_device_pointer_has_button over the plain has_button
If a device has multiple capabilities, has_button is imprecise. A device with
tablet and pointer capability for example may have BTN_LEFT on the pointer
interface but not on the tablet interface.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Marek Chalupa [Thu, 12 Feb 2015 14:25:36 +0000 (09:25 -0500)]
add simple symbols leak checker
This patch adds simple script that compares libinput.sym file to the
functions that are marked by LIBINPUT_EXPORT. This script is added
to make check target.
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 11 Feb 2015 03:48:34 +0000 (13:48 +1000)]
Add two missing @ref tags
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 10 Feb 2015 06:05:04 +0000 (16:05 +1000)]
evdev: add missing %s for accelerometer tagging
Oh gcc warning, where are thou?
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Sun, 8 Feb 2015 23:45:33 +0000 (09:45 +1000)]
doc: add a dot graph for device groups and two missing @refs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 3 Feb 2015 02:21:19 +0000 (12:21 +1000)]
evdev: switch to using udev's device tagging system
Use ID_INPUT_FOO to assume a device is a FOO, don't decide ourselves based on
whatever bits are available. This moves the categorization out to udev's
input_id builtin by default and other bits that tag the device. libwacom tags
all known devices as ID_INPUT_TABLET and (for touch-enabled ones)
ID_INPUT_TOUCH - we can re-use that knowledge then.
Ignore anything that doesn't have ID_INPUT set, this provides for an easy way
of making devices "invisible" to libinput.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Benjamin Tissoires [Mon, 2 Feb 2015 18:37:14 +0000 (13:37 -0500)]
evdev: retrieve udev tags
udev already tags the devices by opening each of them and analyzing their
features. We are basically re-doing this in libinput.
The advantage of udev tags over the plain heuristic from libinput is that
users (or driver writers) can force some tags that are not detected by
common rules. For instance, the pad part of the Wacom tablets is difficult
to discriminate from a joystick or a pointer.
For now we tread INPUT_ID_KEY and INPUT_ID_KEYBOARD as equivalent. It may
become necessary to separate them later.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Peter Hutterer [Thu, 5 Feb 2015 22:58:55 +0000 (08:58 +1000)]
README: Add the libinput component to the bugzilla URL
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 6 Feb 2015 04:32:05 +0000 (14:32 +1000)]
doc: document that we're ignoring position-less clicks
This can happen a lot easier on the new Lenovo series, so document that this
is intentional behavior.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 5 Feb 2015 03:39:04 +0000 (13:39 +1000)]
Introduce device groups to group logical devices together
Devices like Wacom tablets have multiple event nodes (touch, pad and stylus).
This requires some logical grouping, e.g. setting an Intuos 5 tablet
left-handed effectively turns it upside down. That then applies to both the
stylus and the touch device.
Merging the devices into one struct libinput_device is not feasable, it
complicates the API for little benefit. A caller would still need access to
all subdevices to get udev handles, etc. Some configuration options apply to
the whole device (left-handed) but some (may) only apply to a single subdevice
(calibration, natural scrolling).
Addressing this would make the libinput API unwieldly and hard to use.
Instead, add a device group concept. Each device is a member of a device
group - a singleton for most devices. Wacom tablets will have a single group
across multiple devices, allowing the caller to associate the devices together
if needed.
The API is intentionally very simple and requires the caller to keep track of
groups and which/how many devices are in it. The caller has more powerful
libraries available to do that than we have.
This patch does not address the actual merging of devices into the same
device group, it simply creates a new group for each new device.
[rebased on top of 0.10]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Peter Hutterer [Fri, 6 Feb 2015 00:33:02 +0000 (10:33 +1000)]
configure.ac: libinput 0.10.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Olivier Fourdan [Thu, 5 Feb 2015 13:33:31 +0000 (14:33 +0100)]
Fix an abort if the device speed is NaN
When using libinput with xf86-input-libinput, the device speed is
represented as a float passed via X properties.
If a buggy client gives a broken value, the conversions that occur
can cause the value of speed to be NaN (not a number), aka infinity.
In C, any comparison with NaN always gives false, whatever the value.
So that test in libinput_device_config_accel_set_speed():
(speed < 1.0 || speed > 1.0)
will necessarily return FALSE, defeating the test of range.
However, since since any comparison with NaN is false, the
opposite assert() in accelerator_set_speed():
(speed >= 1.0 && speed <= 1.0)
will be false as well, thus triggering the abort() and the crash of
the entire X server along with it.
The solution is to use the same construct in both routines, so that
it fails gracefully in libinput_device_config_accel_set_speed().
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 5 Feb 2015 01:46:55 +0000 (11:46 +1000)]
cosmetic: fix grammar in doxygen
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 3 Feb 2015 23:11:46 +0000 (09:11 +1000)]
touchpad: mark two switch fallthroughs with comments
Coverity pointed these out, they're false positives but mark them with
comments to make it obvious to the reader.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 3 Feb 2015 04:18:15 +0000 (14:18 +1000)]
path: make sure udev devices are initialized before usage
When creating uinput devices, we get the devnode from the kernel directly
rather than through udev. When we add this to the path backend too quickly the
udev_device we get may not be fully initialized and properties may be missing.
This causes false test results.
Avoid this by making sure the handle we have is initialized. This should never
trigger on a real device anyway, even creating a device through litest is slow
enough to avoid this issue. Only affected are the tests in misc.c where we
create the uinput device directly.
Nonetheless, handle this for the generic case so we don't run into heisenbugs
later.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 3 Feb 2015 03:42:44 +0000 (13:42 +1000)]
test: switch event conversion tests to use litest devices
Makes the code use more commonly used paths, no real functional changes at
this point. This was using hand-crafted devices as it predates the
litest_add_for_device() helper.
For an upcoming patch to use the udev ID_INPUT_. tags the
event_conversion_key test requires this change: without it the device will be
tagged with ID_INPUT_KEY but not ID_INPUT_KEYBOARD. This could be fixed by
adding all normal keyboard keys to the uinput device but it's easier to just
re-use litest.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Mon, 2 Feb 2015 23:36:17 +0000 (09:36 +1000)]
zalloc the libinput_source, don't malloc it
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Peter Hutterer [Mon, 2 Feb 2015 23:37:53 +0000 (09:37 +1000)]
Don't init pointer acceleration on absolute devices
Note: touchpads have a different backend, we never get here in that case. This
only applies to true absolute pointer devices.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Peter Hutterer [Mon, 2 Feb 2015 23:35:19 +0000 (09:35 +1000)]
test: add pointer acceleration defaults test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Peter Hutterer [Mon, 2 Feb 2015 23:24:08 +0000 (09:24 +1000)]
evdev: set the default speed after initializing ptraccel
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Peter Hutterer [Mon, 2 Feb 2015 23:20:59 +0000 (09:20 +1000)]
filter: zalloc the struct to make sure the speed is initialized
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Peter Hutterer [Mon, 2 Feb 2015 23:14:20 +0000 (09:14 +1000)]
cosmetic: remove double empty-line
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 2 Feb 2015 00:47:52 +0000 (10:47 +1000)]
test: add per-device udev rule support
Don't rely on a magic version tag, instead let a device define a udev rule and
drop that into the udev runtime directory before the device is created.
There are a couple of caveats with this approach: first, since this changes
system-wide state it may cause issues on the device the test suite is run on.
This can be avoided if the udev rules have filter patterns that ensure only
test devices are affected.
Second, the check test suite aborts but it doesn't run the teardown() function
if a test fails. So far this wasn't a problem since uinput devices disappear
whenever we exit. The rules files will hang around though, so an unchecked
fixture was added to delete all litest-foo.rules files before and after a test
case starts. Unchecked fixtures are run regardless of the exit status of the
test but run in the same address space - i.e. no ck_assert() usage.
Also unchecked fixtures are only run once per test-case, not once per test
function. For us, that means they're only run once per device (we use the
devices as test case), i.e. if a test fails and the udev rule isn't tidied up,
the next test may be unpredictable. This shouldn't matter too much though.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 28 Jan 2015 02:52:22 +0000 (12:52 +1000)]
Add missing doxygen ingroup tag for libinput_device_get_udev_device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 30 Jan 2015 04:05:01 +0000 (14:05 +1000)]
configure.ac: libinput 0.9.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 28 Jan 2015 05:46:31 +0000 (15:46 +1000)]
test: add tests for new lenovo touchpads
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 28 Jan 2015 05:38:00 +0000 (15:38 +1000)]
touchpad: re-route trackpoint buttons on the *50 Lenovo series
The laptops on this series have the physical trackpoint buttons back but
wired them up to the touchpad instead of the trackpoint device and they appear
as BTN_0, BTN_1 and BTN_2 for left, right, middle.
The udev hwdb marks these for us with the TOUCHPAD_HAS_TRACKPOINT_BUTTONS tag
[1]. Use that tag to identify them and re-route the events through the
trackstick device after mangling the event codes to represent the actual
buttons.
[1] http://cgit.freedesktop.org/systemd/systemd/tree/hwdb/70-touchpad.hwdb
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 28 Jan 2015 05:37:21 +0000 (15:37 +1000)]
test: add a test device for the Lenovo X1 Carbon 3rd
Notable: sends BTN_0/1/2 instead of the trackpoint
This device currently has the INPUT_PROP_TOPBUTTONPAD property set, kernel
patches [1] and [2] are pending to remove this. This test device already lacks
the property.
[1] https://patchwork.kernel.org/patch/
5730371/
[2] https://patchwork.kernel.org/patch/
5730451/
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 28 Jan 2015 05:59:03 +0000 (15:59 +1000)]
test: set the input_id->version as well in litest devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Friedrich Schöller [Fri, 23 Jan 2015 21:31:05 +0000 (22:31 +0100)]
tools: Check if axis value is available in debugging GUI
libinput complained with lots of "client bug" messages because the GUI tool
did not check which axis values were available.
Signed-off-by: Friedrich Schöller <code@schoeller.se>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Friedrich Schöller [Fri, 23 Jan 2015 21:31:04 +0000 (22:31 +0100)]
tools: Use correct event axis in debugging GUI
Vertical axis values were used for the horizontal axis as well.
Introduced
1baf109b40e5d610cb46d313d7c412419af8c9e0
Signed-off-by: Friedrich Schöller <code@schoeller.se>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Hans de Goede [Wed, 21 Jan 2015 11:04:48 +0000 (12:04 +0100)]
evdev: Be more careful about what we consider a joystick
After switching my main workstation over to using xf86-input-libinput, I
noticed that the multi-media keys like play/pause on my keyboard no longer
worked.
It turns out that the second hid interface on my keyboard which has the
multimedia-keys, also declares having: BTN_BASE6 and BTN_MODE which both
fell into the range we were using to test for something being a joystick.
The commit makes our joystick test mode strict, restoring functionality
of the multi-media keys on the keyboard in question.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Marek Chalupa [Wed, 21 Jan 2015 11:11:22 +0000 (12:11 +0100)]
Remove libinput_event_pointer_get_axis from symbols
This function was removed in
1baf109b40
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 19 Jan 2015 10:31:15 +0000 (20:31 +1000)]
Move the new click method configuration tools to the right symbol version set
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 16 Jan 2015 00:16:47 +0000 (10:16 +1000)]
tools: add click method config to the tools
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 4 Dec 2014 04:40:53 +0000 (14:40 +1000)]
tests: add a few clickfinger tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 4 Dec 2014 01:47:32 +0000 (11:47 +1000)]
test: run clickfinger test for all clickpad-capable devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 4 Dec 2014 01:22:41 +0000 (11:22 +1000)]
test: add tests for clickfinger defaults
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 14 Jan 2015 13:54:43 +0000 (14:54 +0100)]
touchpad: hook up click method configuration
Allow switching between softbuttons and clickfinger on any mt-capable
clickpad.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
[hdegoede@redhat.com] Keep top softbuttons working when enabling clickfinger
[hdegoede@redhat.com] Simply touchpad click method switching
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 3 Dec 2014 04:45:26 +0000 (14:45 +1000)]
Add a config interface for click methods
Two methods are provided:
* button area - used on most clickpads, a click with a touch within a given
area generates left/middle/right clicks
* clickfinger - used on apple touchpads, a click with 1/2/3 fingers on the
touchpad generates a left, right, middle click
Both methods already exist in the touchpad code, this is just the
configuration interface.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Hans de Goede [Wed, 14 Jan 2015 09:17:06 +0000 (10:17 +0100)]
touchpad: Allow the center of pinned fingers to drift over time
Allow the center of pinned fingers to drift over time, to avoid accidentally
unpinning fingers.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=86807
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Tue, 6 Jan 2015 03:33:38 +0000 (13:33 +1000)]
test: add another hover test
Release one touch point at the same time as a fake touch.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Fri, 12 Dec 2014 00:02:15 +0000 (10:02 +1000)]
test: add touchpad hover finger test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 11 Dec 2014 03:30:33 +0000 (13:30 +1000)]
test: add a semi-mt + hover synaptics touchpad
This device sends touch information before BTN_TOUCH
https://bugs.freedesktop.org/show_bug.cgi?id=87197
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Tue, 16 Dec 2014 01:28:26 +0000 (11:28 +1000)]
test: move semi-mt special tracking into the shared litest.c
An upcoming synaptics semi-mt device needs the same code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 11 Dec 2014 06:39:04 +0000 (16:39 +1000)]
touchpad: add a TOUCH_HOVERING state
Some touchpads provide touch information while the finger hovers over the
touchpad, i.e. before BTN_TOUCH. Add a touch state for those touchpads so we
can ignore the touches until they actually start.
The approach is now: instead of BEGIN we mark a new touch as HOVERING.
Use the BTN_TOOL_FINGER, BTN_TOOL_DOUBLETAP information during
tp_process_state() to mark any touches that are hovering as down or ended.
i.e. provided BTN_TOUCH is down: if BTN_TOOL_FINGER is down, one hovering
touch gets marked as down, if DOUBLETAP is down, two touches are marked as
down, etc.
When ending touches, switch them back into HOVERING if the BTN_TOOL_FINGER
is still set, otherwise end them properly.
https://bugs.freedesktop.org/show_bug.cgi?id=87197
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Fri, 12 Dec 2014 02:14:13 +0000 (12:14 +1000)]
touchpad: use ffs instead of a manual count
BTN_TOOL_FINGER, DOUBLETAP, etc. are mutually exclusive in the kernel, so we
can use ffs here instead of manually counting.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Fri, 12 Dec 2014 00:31:12 +0000 (10:31 +1000)]
touchpad: factor out fake finger handling
We need this for determining hovering touches on some semi-mt touchpads.
This makes the fake_touches mask use bit 0 for BTN_TOUCH, and the other bits
for BTN_TOOL_FINGER, BTN_TOOL_DOUBLETAP, etc. BTN_TOUCH is independent of the
rest, the others are mutually exclusive in the kernel.
Since the mask isn't a straightforward bitmask anymore, abstract it all
through helper functions.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Thu, 15 Jan 2015 00:40:44 +0000 (10:40 +1000)]
configure.ac: libinput 0.8
Note: soname bump
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 15 Jan 2015 01:43:31 +0000 (11:43 +1000)]
doc: move DOTFILE_DIRS to libinput.doxygen.in
We specify a bunch of other (static) things in the .in file, let's be
consistent.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 15 Jan 2015 01:43:04 +0000 (11:43 +1000)]
doc: specify the IMAGE_PATH relative to the source
Fixes doxygen build with custom builddirs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Thu, 15 Jan 2015 00:49:56 +0000 (10:49 +1000)]
doc: add some missing files to EXTRA_DIST
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Stephen Chandler Paul [Wed, 7 Jan 2015 02:20:22 +0000 (21:20 -0500)]
Rename functions for left handed device configurations
Some devices require more than just flipping around the buttons, such as
tablets.
When it comes to devices like tablets, because the position of the palm rest is
on the right, the entire tablet has to be flipped around in order to be usable
by lefties. As such, this requires that we reverse the coordinates of the
tablets in addition to flipping the buttons on the tablet. As such, renaming
these functions so that they aren't specific to devices where only the buttons
are flipped seems appropriate.
Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 14 Jan 2015 23:48:29 +0000 (09:48 +1000)]
Merge branch 'merged-scroll-events'
This is merged on top of the wheel normalization patches. Those introduced an
axis source and an extra "discrete" value to the various internal and external
APIs. This branch changed from a single value to passing dx/dy into all scroll
events.
The conflicts are to change everything to take x, y, x_discrete, y_discrete as
values (and the source axis mask of course).
Conflicts:
src/evdev-mt-touchpad-edge-scroll.c
src/evdev.c
src/libinput-private.h
src/libinput.c
Peter Hutterer [Tue, 13 Jan 2015 05:15:02 +0000 (15:15 +1000)]
Add libinput_event_pointer_get_axis_value_discrete() to count wheel clicks
The recent normalization of wheel events means we get the angle in degrees but
we don't know how this corresponds to clicks. The M325 has a 20 degree click
angle, most other mice have 15 degrees. So an angle of 60 can be 3 or 4 click
events.
Most clients care more about the click count than the angle on a mouse wheel.
Provide that value when needed.
Adding a discrete value to the axis event leaves the possibility of defining
discrete units for finger/continuous scroll sources in the future. Right now,
these will always reuturn 0.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Wed, 24 Dec 2014 01:10:04 +0000 (11:10 +1000)]
Change axis events to carry all directions
Sending separate axis events instead of one unified events is limiting,
especially when simultaneously scrolling in both directions and the caller
tries to implement kinetic scrolling.
Take a page from the tablet-support branch and instead implement the axis
event as a generic event that can contain multiple axes simultaneously.
Right now we only have two (scroll) axes and we could easily just check both
for non-zero values. If we want to allow further axes in the future, we need
a check whether an axis is set in an event, that's what
libinput_event_pointer_has_axis to scroll events() is for.
We also need the mask to notify of a scroll stop event, which could otherwise
be confused as a vertical-only or horizontal-only event.
This is an API and ABI break.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Peter Hutterer [Sun, 11 Jan 2015 22:39:47 +0000 (08:39 +1000)]
Parse the MOUSE_WHEEL_CLICK_ANGLE udev property if present
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Peter Hutterer [Fri, 9 Jan 2015 07:03:45 +0000 (17:03 +1000)]
Change the scroll step distance to 15 and document it as degrees
Similar to the mouse resolution, let's make the scroll distance a sensible
predictable value. Most mice use a 15 degree angle per scroll click, so let's
change to that. This will alter behaviour in clients that expect 10.
We return doubles for the axis value, so that leaves the option of
really fine-grained step sizes in the future.
We currently assume all mice have 15 degree angles. Like the DPI settings, it
will require a udev property to be set. Patch for that to follow.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Peter Hutterer [Sun, 11 Jan 2015 22:15:12 +0000 (08:15 +1000)]
Add a comment to clarify what the prop parameter is
prop isn't the full property line, just the value.
And document the return value too while we're at it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Stephen Chandler Paul [Mon, 5 Jan 2015 22:44:37 +0000 (17:44 -0500)]
libinput.h: Fix some line wrapping in documentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Marek Chalupa [Fri, 9 Jan 2015 09:34:46 +0000 (10:34 +0100)]
build-pedantic: use main(void)
Main has unused parameters argc and argv. Since they are unused and
C 99 allows to prototype main as 'int main(void)',
remove them and replace by void. It fixes build when unused parameters
are treated as errors.
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Wed, 7 Jan 2015 04:32:16 +0000 (14:32 +1000)]
tools: switch signal handler in event-debug
Under gdb, signalfd will still deliver the signal when gdb itself is
interrupted and quit event-debug. For a debugging tool, that's not optimal.
Switch to a normal signal handler instead, signalfd is overkill here anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Peter Hutterer [Wed, 7 Jan 2015 04:09:00 +0000 (14:09 +1000)]
tools: fail if we can't set up signal handlers in event-debug
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Jonas Ådahl [Wed, 7 Jan 2015 04:10:28 +0000 (12:10 +0800)]
Dropped an extra 'the'
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Jonas Ådahl [Wed, 7 Jan 2015 04:03:53 +0000 (12:03 +0800)]
s/discreet/discrete/
Discreet means to not draw attention.
Discrete means non-continuous.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 5 Jan 2015 23:34:06 +0000 (09:34 +1000)]
touchpad: fix a clang compiler warning
Causes the valgrind tests to fail as tp is considered uninitialized.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer [Mon, 5 Jan 2015 22:49:11 +0000 (08:49 +1000)]
test: fix a clang compiler warning
misc.c:562:10: warning: missing field 'expected_dpi' initializer
[-Wmissing-field-initializers]
{ NULL }
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>