Commit graph

2847 commits

Author SHA1 Message Date
Peter Hutterer
a5c19a5790 libinput 1.9.4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-12-14 15:51:53 +10:00
Peter Hutterer
bf857d3841 tools: print the device in all measure tools
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0b8372962b)
2017-12-14 15:50:52 +10:00
Peter Hutterer
a0a5e9eb7e tools: print out the device used for measuring the trackpoint range
Suggested in https://bugs.freedesktop.org/show_bug.cgi?id=103947#c2

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit d1146930da)
2017-12-14 15:50:08 +10:00
Peter Hutterer
5cf08e8105 tools: clarify PermissionError in measure-trackpoint-range
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit ac1d5082fe)
2017-12-14 15:50:03 +10:00
Peter Hutterer
c863ab5c8e fallback: send key events out immediately upon receiving them
Commit db3b6fe5f7 "fallback: change to handle the state at EV_SYN time"
introduced regressions for two types of event sequences.

One is a kernel bug - some devices/drivers like the asus-wireless send a key
press + release within the same event frame which now cancels out and
disappears into the ether. This should be fixed in the kernel drivers but
there appear to be enough of them that we can't just pretend it's an outlier.

The second issue is a libinput bug. If we get two key events in the same frame
(e.g. shift + A) we update the state correctly but the events are sent in the
order of the event codes. KEY_A sorts before KEY_LEFTSHIFT and our shift + A
becomes A + shift.

Fix this by treating key events as before db3b6fe5f7 - by sending them out
as we get them.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 1c8636923b)
2017-12-08 10:28:56 +10:00
Peter Hutterer
05a2da818b libinput 1.9.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-28 15:06:20 +10:00
Peter Hutterer
6e8beeb280 tools: fix dashes in man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 1b54b726f0)
2017-11-28 12:44:41 +10:00
Peter Hutterer
e961c1ff5c debounce: handle a timeout in MAYBE_SPURIOUS state
Sequences to trigger:
- spurious debouncing is enabled
- release a button in IS_DOWN state -> RELEASE_DELAYED
- short timeout triggers RELEASE_WAITING

If a button press now comes before the long timeout expires, we transition to
MAYBE_SPURIOUS where the long timeout may expire. In that case we should
transition to pressed state again.

Reported-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit ac1748ef4d)
2017-11-28 12:44:41 +10:00
Peter Hutterer
c77b6b4c96 evdev: add new debouncing code
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>
(cherry picked from commit de994d135e)
2017-11-28 12:44:41 +10:00
Peter Hutterer
8c55bc060d fallback: change to handle the state at EV_SYN time
The previous approach was to remember the last event and flush it at the right
time. The new approach is to update the device state during the frame and send
out the events at EV_SYN time.

This gives us two advantages: we are not dependent on the kernel order of how
events come in and we can process events depending on other events in the same
frame. This will come in handy later for button debouncing.

This is also the approach we have in the touchpad and tablet backends.

Two FIXMEs are left in place, the button debouncing code and the lid switch
code. Both need to be handled in future patches.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit db3b6fe5f7)
2017-11-28 12:44:41 +10:00
Peter Hutterer
52cdbc1299 evdev: fix axis mixup for the wheel click angles
vertical wheel is y, not x

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit eb048529b5)
2017-11-28 12:44:41 +10:00
Peter Hutterer
fc78e88870 fallback: drop unused ratelimit struct
This one is present in the parent evdev device

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 8e86f28931)
2017-11-28 12:44:41 +10:00
Peter Hutterer
5d78484891 fallback: create the evdev-fallback.h header file
So we can split up evdev-fallback.c into multiple files where needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 87920f4992)
2017-11-28 12:44:41 +10:00
Peter Hutterer
16b290a785 test: replace litest_button_click with a debounced version
This is via a simple search & replace. Later auditing is needed to switch
clicks that should not be debounced (e.g. touchpads) back to a non-debounced
version.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 8cf6893f6d)
2017-11-28 12:44:41 +10:00
Peter Hutterer
01ae8bd6a2 touchpad: post a SYN_REPORT after a faked trackpoint button
This has no real effect at the moment because the fallback interface doesn't
care much about SYN_REPORT, it processes events as they come in. But it's a
bug nonetheless, the process() callback expects correct event frames.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit dc7fb65db5)
2017-11-28 12:44:41 +10:00
Peter Hutterer
c24c2af560 test: add a missing libinput_dispatch() to the debounce_timer test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 6c8068601a)
2017-11-28 12:44:41 +10:00
Peter Hutterer
bd1ad68630 tools: fix typo in man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b170993b74)
2017-11-16 15:31:14 +10:00
Peter Hutterer
56bcb2999e libinput 1.9.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-15 14:17:51 +10:00
Peter Hutterer
4ec04fa960 man: add --enable-middlebutton to debug-events man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 13c9ef07a2)
2017-11-15 13:37:21 +10:00
Peter Hutterer
e35c202df7 tools: handle missing evdev/pyudev modules with a better error message
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 67bfb5cf2e)
2017-11-15 13:26:10 +10:00
Peter Hutterer
1593d7da32 tools: when the command isn't installed, print that
Makes it more user-friendly to be able to split the tools into multiple
packages

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 92aa1d1418)
2017-11-15 13:26:06 +10:00
Peter Hutterer
73c9ed2cd9 tools: fix missing words in man page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit be344a3afb)
2017-11-15 13:26:03 +10:00
Peter Hutterer
ed17f8b637 doc: add a FAQ regarding "please add a configuration option"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit c67b74b45e)
2017-11-14 14:29:30 +10:00
Stefan Brüns
15e40a42e7 tools: Handle LIBINPUT_SWITCH_TABLET_MODE
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 48fd22def7)
2017-11-14 14:29:17 +10:00
Stefan Brüns
5c989940b6 tools: Show gesture/switch capabilities in list-devices output
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 5ea84fa7da)
2017-11-14 14:29:16 +10:00
Peter Hutterer
edd83fe99e test: mkdir -p the udev rules and hwdb directories
Especially /run/udev/rules.d may not exist, causing a test suite failure.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit d332a64df8)
2017-11-14 14:29:09 +10:00
Peter Hutterer
e7be909838 doc: update test suite page for ninja and other recent changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b15b66616e)
2017-11-14 14:29:07 +10:00
Peter Hutterer
03cd377e00 test: fix the device name for the magic mouse test device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 04c6439449)
2017-11-14 14:29:01 +10:00
Peter Hutterer
89660005a8 doc: quote all paths in the doxygen file
https://bugs.freedesktop.org/show_bug.cgi?id=103532

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit fb467dce8f)
2017-11-14 14:28:57 +10:00
Peter Hutterer
5b862de70d circle.yml: add ninja dist to tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit e182489ce7)
2017-11-14 14:28:55 +10:00
Peter Hutterer
a83085e4f9 touchpad: allow for multiple paired keyboards
needed for the razer blade keybard which provides multiple event nodes for
one physical device but it's hard/impossible to identify which one is the real
event node we care about.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 4d7592066a)
2017-11-14 14:28:29 +10:00
Peter Hutterer
021865232d libinput 1.9.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-30 14:58:05 +10:00
Peter Hutterer
41a70bbe92 fallback: fix lid switch event listener being initialized twice
Once the lid is closed, the keyboard event listener is set up to open the lid
for us on keyboard events. With the right sequence, we can trigger the
listener to be added to the list multiple times, triggering an assert in the
list test code (or an infinite loop in the 1.8 branch).

Conditions:
* SW_LID value 1 - sets up the keyboard listener
* keyboard event - sets lid_is_closed to false
* SW_LID value 0 - is ignored because we're already open
* SW_LID value 1 - sets up the keyboard listener again

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-27 15:20:35 +10:00
Benjamin Tissoires
57c5a409d6 udev: drop the version field in device groups
The version field is a per device information. We have
no guarantees a touchscreen and a tablet device will share
the same version of the firmware (especially if both
firmwares are from different vendors).

Fixes the touch arbitration for the Dell Canvas 27

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-26 18:25:54 +10:00
Peter Hutterer
8edae4feb6 meson: require GTK 3.20
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-26 16:47:28 +10:00
Peter Hutterer
940658e1b7 tablet: print what capability is missing when rejecting a device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-26 11:01:29 +10:00
Peter Hutterer
ed52002c8d touchpad: cap the edge palm detection zones at 8mm
The main purpose of the edge zone is to detect palms in the area where we
cannot assume a full finger size and thus cannot use any other palm detection
mechanism. 8mm should be large enough that a finger should be detected based
on other properties (size, pressure, ...).

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-25 14:21:44 +10:00
Peter Hutterer
d27c464a49 Revert "touchpad: cap the edge palm detection zones at 8mm"
This patch only adjusted the left edge, not the right edge which was still on
8%

This reverts commit 3e9e0e2eb1.
2017-10-25 14:21:24 +10:00
Peter Hutterer
3e9e0e2eb1 touchpad: cap the edge palm detection zones at 8mm
The main purpose of the edge zone is to detect palms in the area where we
cannot assume a full finger size and thus cannot use any other palm detection
mechanism. 8mm should be large enough that a finger should be detected based
on other properties (size, pressure, ...).

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
2017-10-24 08:28:32 +10:00
Peter Hutterer
017d6bb903 test: add a wacom bamboo test device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-20 15:44:32 +10:00
Peter Hutterer
8494668c2d test: fix missing BTN_9 for the MobileStudio device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-20 15:44:32 +10:00
Peter Hutterer
48a2eeb525 test: fix pid for the 13HDT pad 2017-10-20 15:44:32 +10:00
Peter Hutterer
327321a446 libinput 1.9.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-19 13:40:15 +10:00
Peter Hutterer
f061027dbb touchpad: cut down on excessive logging for palm size
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-19 13:28:42 +10:00
Peter Hutterer
28ef7456d3 util: add an extra assert for list_insert()
If we're adding an element that's not null or not a freshly initialized list,
chances are we haven't removed it from a previous list.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-10-18 16:17:22 +10:00
Peter Hutterer
a06256d1c3 test: unref the litest device *after* removing it from the path interface
Our own reference may be the last one that's still alive if the context is
currently suspended (litest_suspend()). If we unref before removing it from
the path interface, we access already freed memory.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-10-17 16:55:27 +10:00
Peter Hutterer
b18f9e6944 test: fix a comment in the log_priority test
We don't rely that the lid switch doesn't work in this test, but we always
print a few things when a device gets successfully added.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-10 19:09:29 +10:00
Peter Hutterer
a251cec994 libinput 1.8.902
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-10 12:15:35 +10:00
Peter Hutterer
4bb5ce5b74 Fix meson options default values
The keyword is 'value', not 'default'. With meson 0.43 this now stops
building.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-10 08:21:10 +10:00
Peter Hutterer
b9914ec279 tools: restore default permissions for a source file
This was accidentally made 755 as part of e9fc59efc8

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-10-10 08:05:40 +10:00