platform/upstream/libinput.git
2 years agoevdev: A joystick could be ignored before opening input device 85/277685/5 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0 tizen_7.0_hotfix tizen_bkup_20230126 accepted/tizen/7.0/unified/20221110.061709 accepted/tizen/7.0/unified/hotfix/20221116.110953 accepted/tizen/unified/20220721.135044 submit/tizen/20220720.055550 tizen_7.0_m2_release
duna.oh [Tue, 12 Jul 2022 06:17:52 +0000 (15:17 +0900)]
evdev: A joystick could be ignored before opening input device

add checking if the builtin property 'ID_INPUT_JOYSTICK' is set.
Because 'LIBINPUT_IGNORE_DEVICE' is usually set by udev rule,
it may not be determined until the udev rule is parsed.

A joystick is not supported in libinput for now.

Change-Id: I19cc67538dd1ccc6f1c6f2a2dccbb96d344d40ac

3 years agoquirks.c: Fix a coverity warning of potential NULL dereferences tizen_work_20220207 accepted/tizen/unified/20220214.131011 submit/tizen/20220211.064101
Duna Oh [Fri, 11 Feb 2022 05:03:56 +0000 (14:03 +0900)]
quirks.c: Fix a coverity warning of potential NULL dereferences

3 years agotablet: Fix divide by zero error. 'count' could be zero submit/tizen/20220208.100129 submit/tizen/20220209.072019
Duna Oh [Tue, 8 Feb 2022 06:39:18 +0000 (15:39 +0900)]
tablet: Fix divide by zero error. 'count' could be zero

3 years agopackagin: Bump up to 1.17.0
Duna Oh [Mon, 7 Feb 2022 16:31:41 +0000 (01:31 +0900)]
packagin: Bump up to 1.17.0

3 years agoChecking return value
dyamy-lee [Mon, 26 Apr 2021 06:13:30 +0000 (15:13 +0900)]
Checking return value

When using return value from other function, it is usually checked for it.

Change-Id: I071942d9885500ce37adf08f89788d59d031d458

3 years agoAdd Initialization of variable
dyamy-lee [Mon, 26 Apr 2021 05:05:42 +0000 (14:05 +0900)]
Add Initialization of variable

Add initialization for uninitialized pointer field.
Add initialization for uninitialized value of struct field.

Change-Id: I2faf84800bf54abdff4f18a1d920b1a162a07ad0

3 years agoResolve a resource leak
dyamy-lee [Mon, 26 Apr 2021 05:03:27 +0000 (14:03 +0900)]
Resolve a resource leak

fd going out of scope leaks the handle. So, it add close(fd) when it unfortunately return.

Change-Id: I00caca9166b30575503efbb41522bc2d5be8c2c4

3 years agoImplements TouchEventCheckTest for libinput haltests
dyamy-lee [Wed, 21 Apr 2021 08:01:49 +0000 (17:01 +0900)]
Implements TouchEventCheckTest for libinput haltests

It's same way of checking MouseEventCheckTest.
For test, get lists of libinput devices and check validation of created touch event.
Only different thing with others is check it is mult touch support.
It supports multi touch, it generates libiput touch event and saves sequencely. For example, touch down, move, up.
It checkes devices capability which is touch, and checkes matching of events. If one of them checked successfully same events as created events, other touch devices can be skipped.

Change-Id: I0a60e675c14714c67debd0cfaac3c9ed80a1dc03

3 years agoImplements KeyboardEventCheckTest for libinput haltests
dyamy-lee [Wed, 21 Apr 2021 07:48:43 +0000 (16:48 +0900)]
Implements KeyboardEventCheckTest for libinput haltests

It's same way of checking MouseEventCheckTest.
For test, get lists of libinput devices and check validation of created keyboard event.
It generates libinput keyboard event and saves sequencely. For example, key down, up, key down up.
It checkes devices capability which is keyboard, and checkes matching of events. If one of them checked successfully same events as created events, other keyboard devices can be skipped.

Change-Id: I8d20d9c324331c759bcce8a14096819b681e36ff

3 years agoImplements MouseEventCheckTest for libinput haltests
dyamy-lee [Wed, 21 Apr 2021 07:36:59 +0000 (16:36 +0900)]
Implements MouseEventCheckTest for libinput haltests

For test, get lists of libinput devices and check validation of created mouse event.
It generates libinput mouse event and saves sequencely. For example, mouse left button down, move, up.
It checkes devices capability which is mouse, and checkes matching of events. If one of them checked successfully same events as created events, other mouse devices can be skipped.

Change-Id: Ifa06d24d0796eb3b207dc30f13b924af1804a3e1

3 years agoAdd testing get libinput devices list for libinput haltests
dyamy-lee [Wed, 21 Apr 2021 07:08:45 +0000 (16:08 +0900)]
Add testing get libinput devices list for libinput haltests

For saving libinput devices list, create struct about device info(Capability, path) and function for handling libinput add event.
It only saves real devices. It means, it skips uinput device and checks property of udev device.

Change-Id: Ibf42abe728c550e40da13897c02b8abdc7235baa

3 years agoAdd SetUp/TearDown in libinput haltests
dyamy-lee [Wed, 21 Apr 2021 06:44:40 +0000 (15:44 +0900)]
Add SetUp/TearDown in libinput haltests

Every test creates libinput and udev, and removes them. So, executing common logic as using SetUp/TearDown.

Change-Id: I445db460c282a6f929ac8db5a70c0aa67302f32a

3 years agoAdd libinput haltests frame
dyamy-lee [Wed, 21 Apr 2021 06:35:11 +0000 (15:35 +0900)]
Add libinput haltests frame

It generate the libinput haltests rpm package successfullty for testing input devices in hal by adding build configuration and packaging configuration.
It test udev create, first. And it will be implement each device types test later.

Change-Id: I86312d798503b1816c2826df35590031d1d2305a

3 years agopackaging: Bump up to 1.16.1
jeon [Wed, 6 Jan 2021 06:50:29 +0000 (15:50 +0900)]
packaging: Bump up to 1.16.1

Change-Id: Iae16b868b7d372db197e3e4197d7d6f22f37b345

3 years agoFix indentation
INSUN PYO [Mon, 16 Nov 2020 04:57:44 +0000 (13:57 +0900)]
Fix indentation

Change-Id: I957b966407ec281bb7b91cd7ed2dc49e8a3c3802

3 years agoudev-seat: skip addition of unconfigured device by event source
Sung-Jin Park [Tue, 27 Oct 2020 12:07:50 +0000 (21:07 +0900)]
udev-seat: skip addition of unconfigured device by event source

Change-Id: Id7f36e62ca6f566d8b2023daa39480c6d6a9a568
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
3 years agoflush touch aux events without normal touch events
jeon [Wed, 17 Jun 2020 12:57:18 +0000 (21:57 +0900)]
flush touch aux events without normal touch events

Change-Id: I1a249c253a0f760b523c56cd73d3daa76a2eac0b

3 years agolibinput: remove build warnings
jeon [Thu, 12 Mar 2020 11:55:44 +0000 (20:55 +0900)]
libinput: remove build warnings

  - if ENABLE_QUIRKS is not enabled,
    these variables are not used.

Change-Id: Ie909526d2dc18b47d8b527a141ea59092bb8ade2

3 years agoudev-seat: fix a memory leak
jeon [Thu, 12 Mar 2020 10:44:25 +0000 (19:44 +0900)]
udev-seat: fix a memory leak

Change-Id: Ic6aff8a80c272da3510d611c0fc31f4ace73fbaf

3 years agoquirks: add an option to enable/disable quirks
jeon [Thu, 12 Mar 2020 10:18:00 +0000 (19:18 +0900)]
quirks: add an option to enable/disable quirks

Change-Id: I75aef0d1b1f98b4e2491c9197d1cf8ad54c59341

3 years agopackaging: Bump up to 1.15.0
jeon [Tue, 18 Feb 2020 11:35:25 +0000 (20:35 +0900)]
packaging: Bump up to 1.15.0

3 years agoevdev: fix a memory leak
jeon [Thu, 9 Jan 2020 08:38:16 +0000 (17:38 +0900)]
evdev: fix a memory leak

Change-Id: Id19e03cb517286e2b7e2c127a162195f3c65726b

3 years agoevdev: filtering a BTN_TOOL_FINGER like a BTN_TOUCH
jeon [Fri, 3 May 2019 11:20:25 +0000 (20:20 +0900)]
evdev: filtering a BTN_TOOL_FINGER like a BTN_TOUCH

Change-Id: Iebf445657df1c3028d816f3d5ca5a925a2c571f5

3 years agoevdev: free aux_data struct in fallback destroy function
JengHyun Kang [Fri, 12 Oct 2018 07:00:46 +0000 (16:00 +0900)]
evdev: free aux_data struct in fallback destroy function

Change-Id: Ief8b7ed7bf1aea714e635ca2661450b519012015

3 years agoudev-seat: add apis to set udev monitor's event source and buffer size
Sung-Jin Park [Mon, 20 Aug 2018 07:21:43 +0000 (16:21 +0900)]
udev-seat: add apis to set udev monitor's event source and buffer size

Change-Id: Ib41e5421c174e2d5cc26bc19f077a045ad7a2e19
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
3 years agoudev-seat: remove unused environment variable
Sung-Jin Park [Mon, 20 Aug 2018 05:18:06 +0000 (14:18 +0900)]
udev-seat: remove unused environment variable

Change-Id: I97fa9f2fe29875dcefa3f642f6ecad695d11c555
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
3 years agoevdev: support ABS_MT_PRESSURE events
JengHyun Kang [Fri, 6 Jul 2018 06:19:48 +0000 (15:19 +0900)]
evdev: support ABS_MT_PRESSURE events

Change-Id: I9f7a4d4f6b463a396a3848059990b1a1f2174d23

3 years agolibinput-udev: fix not to install udev rules and utils
Sung-Jin Park [Wed, 21 Mar 2018 08:49:30 +0000 (17:49 +0900)]
libinput-udev: fix not to install udev rules and utils

Change-Id: Ied11493e151a17407c79cd7d88fb84c2132f3ec9
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
3 years agoudev-seat: add LIBINPUT_UDEV_SKIP_INITIAL_ENUMERATION env to enable skip udev enumeration
Sung-Jin Park [Fri, 22 Dec 2017 02:58:49 +0000 (11:58 +0900)]
udev-seat: add LIBINPUT_UDEV_SKIP_INITIAL_ENUMERATION env to enable skip udev enumeration

Change-Id: Id88d21e8d4c40d7d5a85fb68c4bbaef4dc56e7d0
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
3 years agolibinput-util: fix logical error regarding comparison of a long variable with its...
Sung-Jin Park [Mon, 13 Nov 2017 05:10:53 +0000 (14:10 +0900)]
libinput-util: fix logical error regarding comparison of a long variable with its maximum/minimum value

Change-Id: I9d6451a645476efb85477e6e4a9807ea136c05b4
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
3 years agoevdev: fix integer division problem by casting one of two integers as double
Sung-Jin Park [Mon, 13 Nov 2017 06:39:40 +0000 (15:39 +0900)]
evdev: fix integer division problem by casting one of two integers as double

Change-Id: Ice7caf41c4834b625825335c37e14266c31f5cc4
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
3 years agofix build warnings
JengHyun Kang [Wed, 25 Oct 2017 08:02:39 +0000 (17:02 +0900)]
fix build warnings

3 years agopackaging: Bump up to 1.8.0
JengHyun Kang [Tue, 24 Oct 2017 07:39:33 +0000 (16:39 +0900)]
packaging: Bump up to 1.8.0

Change-Id: I4530bc57d1cbc9d9441f95e2e68c944ad7210794

3 years agoevdev: check a null list
JengHyun Kang [Tue, 5 Sep 2017 12:54:07 +0000 (21:54 +0900)]
evdev: check a null list

Change-Id: Ic281e4ff5f266bff9638f204964cc2503c7d90c8

3 years agolibinput-device-group: apply ASLR
Sung-Jin Park [Fri, 11 Aug 2017 07:34:55 +0000 (16:34 +0900)]
libinput-device-group: apply ASLR

Change-Id: I517dde04ad048cace459d23f3df63d8deb26c5c6
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
3 years agoevdev: casting unsigned int to int to compare value
JengHyun Kang [Wed, 7 Jun 2017 11:20:56 +0000 (20:20 +0900)]
evdev: casting unsigned int to int to compare value

Change-Id: I3c1a3da814b89af44e3d6e93bbad2cc7c2535b70

3 years agoevdev: free aux_data list when device is destroy
JengHyun Kang [Wed, 7 Jun 2017 11:10:07 +0000 (20:10 +0900)]
evdev: free aux_data list when device is destroy

Change-Id: I76f8df6b8fed1d01540c1430247ffc00dc28dfc5

3 years agoevdev: remove unreachable code and add exception handling code for aux_data_list
Sung-Jin Park [Tue, 30 May 2017 06:53:19 +0000 (15:53 +0900)]
evdev: remove unreachable code and add exception handling code for aux_data_list

Change-Id: I7e2a936cece97d7a8ecce90fa261976514e35371
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
3 years agosupport a AUX code events generated from EV_ABS
JengHyun Kang [Tue, 25 Apr 2017 09:51:02 +0000 (18:51 +0900)]
support a AUX code events generated from EV_ABS

Change-Id: I144282f5ddc330eb77b73b3da5a36cedb6af069f

3 years agoImport opensource codes for security issue. - evdev: user safe_atod to convert the...
JengHyun Kang [Mon, 17 Apr 2017 09:54:11 +0000 (18:54 +0900)]
Import opensource codes for security issue. - evdev: user safe_atod to convert the matrix values

Change-Id: I140c95ca030822bf6345b09d16d445af0aebd9e5

3 years agopackaging: update packaging file to install license file via %license macro
Sung-Jin Park [Wed, 22 Mar 2017 05:27:02 +0000 (14:27 +0900)]
packaging: update packaging file to install license file via %license macro

Change-Id: I65ccb6a6357abf1a9ea060ca8c1eb3abf077d955
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
3 years agoIgnore joystick devices if LIBINPUT_IGNORE_JOYSTICK env is 1
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

3 years agoevdev: fix a warning. fd should have initialized value.
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

3 years agoevdev: Do not open the already opened device
JengHyun Kang [Mon, 22 Aug 2016 07:54:29 +0000 (16:54 +0900)]
evdev: Do not open the already opened device

Change-Id: I96ba5287f28dfa301628232a5a6a02f1baf1c7a2

3 years agoSet receive buffer size from UDEV_MONITOR_BUFFER_SIZE env
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>
3 years agoCall a input_set_default_property() in evdev_device_create if this function is exist
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

3 years agosvace: Modify a strerror function to strerror_r to gurantee threads safety.
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

3 years agoAdd a device only when the device is not created by libinput_path
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

3 years agoAdd a new API to return wheel click angle value
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

3 years agoApply directory macros
Sung-Jin Park [Fri, 11 Mar 2016 02:50:46 +0000 (11:50 +0900)]
Apply directory macros

Change-Id: I9b419f585ef8b1832fcc114720fc572869771ce3

3 years agoModify a ttrace macro name TRACE_BEGIN to TRACE_INPUT_BEGIN
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

3 years agoRemove unnecessary ttrace and add ttrace logs to another point
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

3 years agoAdd ttrace
JengHyun Kang [Thu, 11 Feb 2016 06:44:36 +0000 (15:44 +0900)]
Add ttrace

Change-Id: I82a316d226c967a396f6ce5671feeafbfb37bd0f

3 years agoAdd a patch for support extra touch events.
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

3 years agoAdd manifest for security domain policy
Mun, Gwan-gyeong [Tue, 4 Aug 2015 08:03:30 +0000 (17:03 +0900)]
Add manifest for security domain policy

Change-Id: I70e41f3e4ad12035ff513fc2a322bedbaf87dd49

3 years agopackaging: correct installation path of udev rule files on 64bit arch
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

3 years agopackaging: Bump to 0.11.0
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>
3 years agopackaging: Bump to 0.8.0
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>
3 years agopackaging: Bump to 0.6.0
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>
3 years agopackaging: Bump to 0.5.0
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>
3 years agopackaging: use upstream tags
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>
3 years agopackaging: Initial packaging on 0.1.0 for Tizen
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>
4 years agolibinput 1.17.0 upstream_bkup_20230126 upstream_work_20220207 1.17.0 upstream/1.17.0
Peter Hutterer [Tue, 23 Feb 2021 09:02:45 +0000 (19:02 +1000)]
libinput 1.17.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/record: fix two coverity complaints
Peter Hutterer [Tue, 23 Feb 2021 06:55:43 +0000 (16:55 +1000)]
tools/record: fix two coverity complaints

In both cases we only read to drain the fd, we don't care about the return
value.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: add a tool to print a libinput recording as a table
Peter Hutterer [Mon, 1 Feb 2021 04:23:06 +0000 (14:23 +1000)]
tools: add a tool to print a libinput recording as a table

This makes it easier to visualize changes in various axes or key states that
should not be there, doubly so for long recordings.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agomeson.build: build libinput replay as well
Peter Hutterer [Tue, 23 Feb 2021 03:30:13 +0000 (13:30 +1000)]
meson.build: build libinput replay as well

Just like the other python-based tools it's just a basename copy, so let's be
consistent here and have all tools perform that way.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/record: use a helper function to get the next event for a device
Peter Hutterer [Thu, 18 Feb 2021 21:40:46 +0000 (07:40 +1000)]
tools/record: use a helper function to get the next event for a device

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/record: switch record over to using epoll
Peter Hutterer [Thu, 18 Feb 2021 07:10:15 +0000 (17:10 +1000)]
tools/record: switch record over to using epoll

Using poll means more difficult fd management, epoll (together with am
modified version of the libinput_sources) makes this a lot easier by simply
using dispatch.

This means we are no longer reliant on a specific file descriptor order in the
poll array.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/record: reword parts of the man page
Peter Hutterer [Fri, 19 Feb 2021 03:19:10 +0000 (13:19 +1000)]
tools/record: reword parts of the man page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/record: use safe_basename() to get to the hid report descriptor
Peter Hutterer [Thu, 18 Feb 2021 04:06:03 +0000 (14:06 +1000)]
tools/record: use safe_basename() to get to the hid report descriptor

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoutils: add a safe version of basename
Peter Hutterer [Thu, 18 Feb 2021 03:43:23 +0000 (13:43 +1000)]
utils: add a safe version of basename

So we don't need to worry about the libgen.h include game.
And we can switch trunkname over to that, making it a bit simpler.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/record: simplify the behavior to emulate Python's join()
Peter Hutterer [Mon, 22 Feb 2021 04:23:27 +0000 (14:23 +1000)]
tools/record: simplify the behavior to emulate Python's join()

Instead of a boolean "is_first", just change the separator.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/replay: Enter quits if there are no events
Peter Hutterer [Tue, 23 Feb 2021 00:53:31 +0000 (10:53 +1000)]
tools/replay: Enter quits if there are no events

If we have no events in any of the recorded devices, state that this is the
case and make Enter simply quit instead of a pointless while loop.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/replay: search for the first event with a timestamp
Peter Hutterer [Fri, 19 Feb 2021 03:31:56 +0000 (13:31 +1000)]
tools/replay: search for the first event with a timestamp

When running with --with-libinput, the first event is the DEVICE_ADDED event
for our device. Those events do not have a timestamp.

We have to find the first event in the recording with a timestamp instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/record: print a header as first line
Peter Hutterer [Mon, 22 Feb 2021 04:52:16 +0000 (14:52 +1000)]
tools/record: print a header as first line

To make the file format easier to detect

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoFix worng quirk name in doc
yuri1969 [Fri, 19 Feb 2021 21:08:55 +0000 (22:08 +0100)]
Fix worng quirk name in doc

The doc mentioned 'AttrTouchPressureRange' quirk but `src/quirks.c` defines
'AttrPressureRange' instead. This led to unknown quirk name errors.

Signed-off-by: yuri1969 <1969yuri1969@gmail.com>
4 years agotools/record: fix outdated comment
Peter Hutterer [Thu, 18 Feb 2021 21:12:17 +0000 (07:12 +1000)]
tools/record: fix outdated comment

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/record: de-inline our functions
Peter Hutterer [Thu, 18 Feb 2021 04:28:12 +0000 (14:28 +1000)]
tools/record: de-inline our functions

Let's leave this up to the compiler, the usual side-effect of inline (compiler
doesn't complain about an unused static function) doesn't apply here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools/record: correct the evdev data format in the man page
Peter Hutterer [Thu, 18 Feb 2021 22:44:23 +0000 (08:44 +1000)]
tools/record: correct the evdev data format in the man page

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agomeson.build: consolidate all man pages
Peter Hutterer [Wed, 17 Feb 2021 23:47:14 +0000 (09:47 +1000)]
meson.build: consolidate all man pages

They all use the same configure_file() process, so let's do them all in a
loop.

Exceptions are the test-suite man page.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agomeson.build: drop the dummy config data and use copy: true instead
Peter Hutterer [Wed, 17 Feb 2021 23:39:46 +0000 (09:39 +1000)]
meson.build: drop the dummy config data and use copy: true instead

We require the meson version this was introduced in, so let's use it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: add test cases for 2/3 finger movement after drag-lock
satrmb [Tue, 16 Feb 2021 10:13:29 +0000 (11:13 +0100)]
test: add test cases for 2/3 finger movement after drag-lock

Same as after a tap, just with a short drag between tap and 2/3 finger movement.
Also fixes a finger coord typo in one of the previously added test cases.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
4 years agolibinput 1.16.902 1.16.902
Peter Hutterer [Tue, 16 Feb 2021 03:10:18 +0000 (13:10 +1000)]
libinput 1.16.902

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: add test cases for 2/3 finger movement after tap
Peter Hutterer [Mon, 15 Feb 2021 07:48:34 +0000 (17:48 +1000)]
test: add test cases for 2/3 finger movement after tap

We have two behaviors here:
- tap + 2fg -> scrolling
- tap + 1fg move + 2f down -> dragging

Let's document this. The 3fg case only has one situation, so let's test that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: drop the needless base event conversion
Peter Hutterer [Mon, 15 Feb 2021 08:00:18 +0000 (18:00 +1000)]
test: drop the needless base event conversion

This was just there to avoid unused variable warnings but the simpler approach
to that is to just not assign a variable in the first place.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: print the event type on mismatch
Peter Hutterer [Mon, 15 Feb 2021 07:34:34 +0000 (17:34 +1000)]
test: print the event type on mismatch

We already have a helper function for this, let's use it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agodoc: update the docs with a note regarding multifinger dragging
Peter Hutterer [Mon, 15 Feb 2021 07:06:34 +0000 (17:06 +1000)]
doc: update the docs with a note regarding multifinger dragging

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: move the no-libwacom test suite into its own stage
Peter Hutterer [Mon, 15 Feb 2021 01:49:30 +0000 (11:49 +1000)]
gitlab CI: move the no-libwacom test suite into its own stage

Easier to spot visually in the GUI that way

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: fix a few missing or wrong drag-lock timeouts
satrmb [Fri, 12 Feb 2021 13:35:53 +0000 (14:35 +0100)]
test: fix a few missing or wrong drag-lock timeouts

These had no consequences apart from occasional "system is too slow" messages,
because the test suite's shorter tap timeout is just barely long enough
for drag-lock, and/or because litest_assert_button_event waits for an event
anyway.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
4 years agotouchpad: permit only one finger on the touchpad at the start of a tap-drag
satrmb [Fri, 12 Feb 2021 11:09:07 +0000 (12:09 +0100)]
touchpad: permit only one finger on the touchpad at the start of a tap-drag

This only affects the actual dragging part of the tap-and-drag interaction;
n-finger tap-and-drag is supposed to be performed with a n-finger tap
followed by a 1-finger drag.
Allowing a second finger in the middle of a drag is still necessary for a
finger swap, which users may need in long-distance drags, especially when
drag-lock is disabled.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
4 years agotouchpad: stretch the tap-and-drag timeout a bit depending on finger count
satrmb [Wed, 23 Sep 2020 09:53:55 +0000 (11:53 +0200)]
touchpad: stretch the tap-and-drag timeout a bit depending on finger count

Some users reported problems triggering multi-finger tap-and-drag,
with reliability decreasing as the finger count increased.
This is plausible because they may shift towards moving the whole hand
up and down, which obviously takes more time than just a finger.

Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
4 years agodoc/user: generate the required package list for the CI distributions
Peter Hutterer [Mon, 15 Feb 2021 02:38:55 +0000 (12:38 +1000)]
doc/user: generate the required package list for the CI distributions

Use yq to extract the package list from the CI configuration, then dump that
into the user docs. This provides the long-requested commands to install all
dependencies without the maintenance effort or risk of going stale.

Note that we are *not* building this in the CI, it's just not needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: add a job to make sure we're running all test suites
Peter Hutterer [Fri, 12 Feb 2021 03:05:57 +0000 (13:05 +1000)]
gitlab CI: add a job to make sure we're running all test suites

Only needs to run when meson.build or the CI script update

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: drop the custom group names
Peter Hutterer [Fri, 5 Feb 2021 04:51:02 +0000 (14:51 +1000)]
test: drop the custom group names

The group names are forced by check (they are called suite names there) but
for our test suite they provide very little benefit. Much easier to just
use the filename a test is in as group name.

This removes the pure substring match for --filter-group, it's now fnmatch
only. group names are short enough that the typing isn't an issue and we don't
want to run tests twice (e.g. 'pad' is also in 'touchpad').

This patch caused #574 until it got fixed in d838e3a3a4c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoutils: add a trunkname() function to extract the trunk of a filename
Peter Hutterer [Fri, 5 Feb 2021 04:36:16 +0000 (14:36 +1000)]
utils: add a trunkname() function to extract the trunk of a filename

/path/to/foo.bar returns "foo"

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: make the test suite names a list
Peter Hutterer [Fri, 12 Feb 2021 03:03:44 +0000 (13:03 +1000)]
gitlab CI: make the test suite names a list

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: use motion events to check the "system is too slow" message
Peter Hutterer [Fri, 12 Feb 2021 00:24:43 +0000 (10:24 +1000)]
test: use motion events to check the "system is too slow" message

Using buttons for this test can trigger debounce warnings instead (in
addition?) to the warning we actually check for. Let's use motion events
instead and double the loop while we're at it so we have double the chance of
triggering at least one warning.

Fixes #574 for unknown reasons

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: wrap the litest user data into a struct
Peter Hutterer [Thu, 11 Feb 2021 21:55:21 +0000 (07:55 +1000)]
test: wrap the litest user data into a struct

litest itself requires the libinput user_data to be set to its own context
struct (see close_restricted). A test that needs its own user_data must not
override this struct - if the context is accessed during libinput_dispatch()
we'll get memory corruption.

See #574

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: move a helper function close to its caller
Peter Hutterer [Thu, 11 Feb 2021 23:29:24 +0000 (09:29 +1000)]
test: move a helper function close to its caller

This is a custom log function for one single test, let's move it next to that
test.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: run the scan-build analysis jobs in script
Peter Hutterer [Thu, 11 Feb 2021 21:28:18 +0000 (07:28 +1000)]
gitlab CI: run the scan-build analysis jobs in script

after_script ignores any exit status so we can't actually fail the job here

Fixes #573

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>