Commit graph

6 commits

Author SHA1 Message Date
Peter Hutterer
2a1095924b Run clang-format over the code
This uses the .clang-format file in the follow-up commit, but committed
prior to that to ease review of said file and various integrations.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
2025-07-01 16:42:44 +10:00
Peter Hutterer
784312a494 test: add clang-format directives to prevent formatting
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
2025-07-01 16:36:14 +10:00
Peter Hutterer
2ec9389a0d test: stringify the LITEST_ value as the device's name
This avoids inconsistencies between the LITEST_ enum value and the
shortname but also makes it easier to grep for any test cases that use
the same define. At the cost of the test names not looking very nice
anymore but oh well.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1157>
2025-03-13 05:57:37 +00:00
Peter Hutterer
aecfcf3d1b test: fix uinput creation for the slotted devices with too many slots
Kernel commit 206f533a0a7c
       "Input: uinput - reject requests with unreasonable number of slots"
limits the number of slots to 99 - let's manually adjust that so we can
keep creating uinput devices.

Since these are just a test device and we don't use the slots here
anyway (they're all fake MT devices) we can manually work around this.
The real devices won't be affected by this since this is a limitation
in uinput, not the input subsystem.

Also move the comment one line up in the ms-surface device, the previous
comment referred to the wrong event code.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1061>
2024-10-15 09:56:19 +10:00
Peter Hutterer
ea115e3c2f Merge branch 'wip/litest-use-sections-for-tests-v2' 2017-09-25 14:35:46 +10:00
Peter Hutterer
23a611ea1e fallback: allow for multiple keyboards to toggle the lid switch
Previously we only listened for events on the first one to come up, based on
the assumption that there can only be one internal keyboard. The Razer Blade
laptop keyboards come with with multiple event nodes, all looking like a
normal keyboard. The one that comes up first is one for special keys, so
typing on the internal keyboard after a lid switch does not toggle the write
state.

Fix this by allowing for up to 3 keyboard listeners for a lid switch.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-25 14:14:20 +10:00