Commit graph

7 commits

Author SHA1 Message Date
Peter Hutterer
1c8636923b 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>
2017-12-08 10:09:26 +10:00
Peter Hutterer
7b5ca6204b Fix a few things scan-build complains about
Uninitialized variables, potential NULL dereferences, dead assignments and an
unused return value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-10 10:37:58 +10:00
Peter Hutterer
3108653e0a test: tighten some test cases
Instead of just waiting for events, use a libinput_dispatch() and assume the
event is there when we want it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-01 09:52:31 +10:00
Peter Hutterer
96f0140749 test: test absence of scroll events on keyboards
Executes the paths to set invalid scroll methods.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-20 10:35:45 +10:00
Peter Hutterer
50dfd52cd7 test: add a test for keyboard LED updates
Not much we can check for here anyway, but at least we can trigger the code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-20 10:35:43 +10:00
Peter Hutterer
a9016f7e15 test: remove some untriggered code from the keyboard tests
The second condition was never triggered because we shouldn't get anything but
keyboard events here. Drain the initial event burst and remove the two
skipping conditions that won't happen anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-17 07:53:49 +10:00
Peter Hutterer
5d66edc9f4 test: prefix all test source files with "test-"
They weren't originally prefixed but the various tests were, but now that we
only have one test runner binary anyway, the prefix helps sorting the files
easily within e.g. gcov results.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-16 08:59:00 +10:00
Renamed from test/keyboard.c (Browse further)