platform/upstream/libinput.git
4 years agoChecking return value 51/257451/2 accepted/tizen_6.5_unified tizen_bkup_20220207 accepted/tizen/6.5/unified/20211029.013629 accepted/tizen/unified/20210510.155204 submit/tizen/20210427.040101 submit/tizen/20210510.014617 submit/tizen/20210609.044139 submit/tizen_6.5/20211028.163501 tizen_6.5.m2_release
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

4 years agoAdd Initialization of variable 50/257450/2
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

4 years agoResolve a resource leak 49/257449/2
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

4 years agoImplements TouchEventCheckTest for libinput haltests 21/257221/3
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

4 years agoImplements KeyboardEventCheckTest for libinput haltests 20/257220/2
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

4 years agoImplements MouseEventCheckTest for libinput haltests 19/257219/2
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

4 years agoAdd testing get libinput devices list for libinput haltests 18/257218/2
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

4 years agoAdd SetUp/TearDown in libinput haltests 17/257217/1
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

4 years agoAdd libinput haltests frame 16/257216/1
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

4 years agopackaging: Bump up to 1.16.1 sandbox/jeon/upgrade accepted/tizen/unified/20210111.024909 submit/tizen/20210107.083851
jeon [Wed, 6 Jan 2021 06:50:29 +0000 (15:50 +0900)]
packaging: Bump up to 1.16.1

Change-Id: Iae16b868b7d372db197e3e4197d7d6f22f37b345

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

Change-Id: I957b966407ec281bb7b91cd7ed2dc49e8a3c3802

4 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>
4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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>
4 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>
4 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

4 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>
4 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>
4 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>
4 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>
4 years agofix build warnings
JengHyun Kang [Wed, 25 Oct 2017 08:02:39 +0000 (17:02 +0900)]
fix build warnings

4 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

4 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

4 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>
4 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

4 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

4 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>
4 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

4 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

4 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>
4 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

4 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

4 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

4 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>
4 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

4 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

4 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

4 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

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

Change-Id: I9b419f585ef8b1832fcc114720fc572869771ce3

4 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

4 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

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

Change-Id: I82a316d226c967a396f6ce5671feeafbfb37bd0f

4 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

4 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

4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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.16.1 sandbox/jeon/upstream upstream_bkup_20220207 1.16.1
Peter Hutterer [Thu, 13 Aug 2020 02:05:39 +0000 (12:05 +1000)]
libinput 1.16.1

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: add two test devices for the false joystick labelling
Peter Hutterer [Wed, 12 Aug 2020 23:37:30 +0000 (09:37 +1000)]
test: add two test devices for the false joystick labelling

Two devices that were affected by the regression fixed with #517

Test devices taken from:
https://gitlab.freedesktop.org/libinput/libinput/-/issues/514
https://gitlab.freedesktop.org/libinput/libinput/-/issues/515

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoinclude: update event codes to v5.8
Peter Hutterer [Wed, 12 Aug 2020 23:59:10 +0000 (09:59 +1000)]
include: update event codes to v5.8

SW_MAX changed and the device_capability_nocaps_ignored test will fail on
older kernels. Change that test to use some other unhandled-by-libinput switch
code instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoevdev: remove now-misleading comment
Peter Hutterer [Wed, 12 Aug 2020 23:40:27 +0000 (09:40 +1000)]
evdev: remove now-misleading comment

libwacom has been removing ID_INPUT_JOYSTICK for years

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoRevert "evdev: fix the check for tablet vs joystick"
Peter Hutterer [Wed, 12 Aug 2020 23:40:03 +0000 (09:40 +1000)]
Revert "evdev: fix the check for tablet vs joystick"

There are a number of devices that have the ID_INPUT_JOYSTICK tag set by udev,
usually because of seemingly random event codes set. We cannot rely on
ID_INPUT_JOYSTICK to be accurate enough.

Fixes #517

This reverts commit eededbeb7faa2b6182c02a84884f54c1cb1d8a2a.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoAdd original MX Master to inverted-horizontal-wheel-having mice.
haarp [Tue, 11 Aug 2020 16:51:05 +0000 (16:51 +0000)]
Add original MX Master to inverted-horizontal-wheel-having mice.

with help from
https://github.com/libratbag/libratbag/blob/master/data/devices/\
logitech-MX-Master.device

Signed-off-by: haarp <main.haarp@gmail.com>
4 years agolibinput 1.16.0 1.16.0
Peter Hutterer [Mon, 3 Aug 2020 05:37:49 +0000 (15:37 +1000)]
libinput 1.16.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: semi-fix the switch_suspend_with_touchpad test
Peter Hutterer [Mon, 3 Aug 2020 05:23:51 +0000 (15:23 +1000)]
test: semi-fix the switch_suspend_with_touchpad test

This used to do nothing, now at least it does the same thing as the
corresponding keyboard test. It merely tests the switch going on/off while a
touchpad is present, so short of an unexpected error message or a crash this
test doesn't actually test for any specific behavior.

Fixes #502

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoFIX: typo on building documentation
Diego Abad A [Mon, 27 Jul 2020 13:37:10 +0000 (08:37 -0500)]
FIX: typo on building documentation

Signed-off-by: Diego Abad <dabada83@gmail.com>
4 years agolibinput 1.15.902 1.15.902
Peter Hutterer [Mon, 27 Jul 2020 05:36:24 +0000 (15:36 +1000)]
libinput 1.15.902

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: build an rpm package to verify the installed file list
Peter Hutterer [Wed, 15 Jul 2020 00:02:20 +0000 (10:02 +1000)]
gitlab CI: build an rpm package to verify the installed file list

This is not a package intended for, it's a job to fail when we accidentally
change the file list. An rpmbuild job like this was what detected
f15da0f10890467712222410233c0bec9faefdd0.

The spec file resembles the Fedora one but has BuildRequires removed (we rely
on the container for that).

The same task could be achieved by keeping a file list and comparing the
installed tree but since I had the rpm spec file already, let's use that for
now.

This requires meson 0.55 which hit F32 yesterday.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: remove a bunch of trailing spaces
Peter Hutterer [Wed, 22 Jul 2020 00:46:53 +0000 (10:46 +1000)]
gitlab CI: remove a bunch of trailing spaces

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotouchpad: disable jump detection on the Lenovo X1 Gen6 touchpad
Peter Hutterer [Sun, 12 Jul 2020 22:21:19 +0000 (08:21 +1000)]
touchpad: disable jump detection on the Lenovo X1 Gen6 touchpad

This touchpad has firmware that seems to buffer events. In the words of the
reporter:

  In usage, it feels like motions vary between smooth and choppy; slow
  movements are smooth and quick movements are choppy. It's as if the
  touchpad aggregates quick movements and sends one big movement instead
  of sending discrete events. To make the movement more natural, the
  events preceding the jump should be of higher magnitude and the jump
  less pronounced, but that's just not how the touchpad works, it seems.

In the actual event data this looks exactly like a pointer jump: small
movements, one big one, then small ones again. If we filter that large
movement out we prevent the user from moving quickly.

There's no way to detect this or work around this, so let's add a quirk that
disables the jump detection for this device.

Fixes #506

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoquirks: correct modalias for the Lenovo X1 Gen6
Peter Hutterer [Tue, 14 Jul 2020 22:11:17 +0000 (08:11 +1000)]
quirks: correct modalias for the Lenovo X1 Gen6

From commit 74e20e0ae01170fdc967e1a5cfeaea02ce57977a, bug report
https://bugzilla.redhat.com/show_bug.cgi?id=1565692

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoevdev: drop the check for tablet vs joystick
Peter Hutterer [Tue, 14 Jul 2020 03:04:25 +0000 (13:04 +1000)]
evdev: drop the check for tablet vs joystick

libwacom has been unsetting ID_INPUT_JOYSTICK for known tablets since 2015
(libwacom 0.12) so this comment is outdated. And the input-id udev builtin
never labels something as tablet *and* joystick. Which means: systemd sets
either tablet or joystick. For tablets that are known to libwacom the joystick
bit gets corrected and we only see the tablet bits.

Tablets unknown to libwacom remain as joysticks and are ignored but that's the
behavior we had anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoevdev: fix the check for tablet vs joystick
Peter Hutterer [Tue, 14 Jul 2020 02:22:48 +0000 (12:22 +1000)]
evdev: fix the check for tablet vs joystick

A device may have ID_INPUT_JOYSTICK and ID_INPUT_KEY in which case it would
still get added, despite being a joystick device. Make sure we check only the
tablet and joystick bits - where a device has the joystick bit set but not the
tablet one we ignore it.

Note that this check will get removed in the next commit anyway, it's just
here to make tracking the change easier in the history (and figuring out where
potential regressions come from).

Fixes #415

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agolibinput 1.15.901 1.15.901
Peter Hutterer [Tue, 14 Jul 2020 23:09:31 +0000 (09:09 +1000)]
libinput 1.15.901

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: rename the identifier in the 50-litest.conf
Peter Hutterer [Tue, 14 Jul 2020 23:36:30 +0000 (09:36 +1000)]
test: rename the identifier in the 50-litest.conf

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: fix the ABS_Y handling for the Protocol A test device
Peter Hutterer [Wed, 8 Jul 2020 23:50:49 +0000 (09:50 +1000)]
test: fix the ABS_Y handling for the Protocol A test device

No effect on the test results because we never use ABS_Y anyway for multitouch
devices.

Fixes #505

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: add missing linebreak in error message
Peter Hutterer [Wed, 8 Jul 2020 03:25:12 +0000 (13:25 +1000)]
tools: add missing linebreak in error message

Missing from a0643a9c9879e569c2a47b13f203561de8031cc0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: grab the device before any lid or tablet mode switches
Peter Hutterer [Fri, 3 Jul 2020 02:46:38 +0000 (12:46 +1000)]
test: grab the device before any lid or tablet mode switches

Putting an EVIOCGRAB on the device before sending those events means no-one
else sees those events - particularly upower. This means no-one else knows the
lid is on or off and thus we never blank the screen (or suspend/shut down but
those are inhibited anyway).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: store the list of open file descriptors in the litest context
Peter Hutterer [Fri, 3 Jul 2020 02:29:16 +0000 (12:29 +1000)]
test: store the list of open file descriptors in the litest context

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: use litest_destroy_context() for test-suite contexts
Peter Hutterer [Fri, 3 Jul 2020 00:47:13 +0000 (10:47 +1000)]
test: use litest_destroy_context() for test-suite contexts

Symmetrical to litest_create_context(), this allows us to store special data
in that context that we have access to during the tests.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: use context creation helper in the log tests
Peter Hutterer [Fri, 3 Jul 2020 00:49:32 +0000 (10:49 +1000)]
test: use context creation helper in the log tests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotest: inhibit shutdown and suspend while the tests are running
Peter Hutterer [Fri, 3 Jul 2020 00:28:53 +0000 (10:28 +1000)]
test: inhibit shutdown and suspend while the tests are running

We test lid switch events which are independently handled by Upower. Let's
make sure nothing else can tell logind to suspend or shut down while we're
running.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: when running the test suite, start the debug-gui minimized
Peter Hutterer [Thu, 2 Jul 2020 23:55:37 +0000 (09:55 +1000)]
tools: when running the test suite, start the debug-gui minimized

This allows us to run the option parsing test without getting interrupted by a
million debug-gui windows popping up for half a second.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoAdd quirk for Lenovo ThinkPad X1 Tablet (1st Gen)
Ryo Munakata [Sun, 28 Jun 2020 20:47:45 +0000 (05:47 +0900)]
Add quirk for Lenovo ThinkPad X1 Tablet (1st Gen)

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
4 years agogitlab CI: hook up coverity
Peter Hutterer [Thu, 2 Jul 2020 02:32:11 +0000 (12:32 +1000)]
gitlab CI: hook up coverity

This requires the COVERITY_SCAN_TOKEN as listed on the project settings page
in coverity itself. The intention here is to run this as a scheduled job, with
the pipeline schedule itself controlling the branch name etc. This way we can
keep the gitlab CI simple enough and just check for COVERITY_SCAN_TOKEN
itself.

This job shouldn't ever fail unless coverity is down (we'll fix that then),
the results of the coverity run are sent to the user that owns the the
scheduled pipeline, i.e. me.

Because coverity does not currently work on F32 (invalid GNU version number:
101), we force this to run on F31.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: drop custom scheduled handling, set FDO_FORCE_REBUILD instead
Peter Hutterer [Thu, 2 Jul 2020 22:50:54 +0000 (08:50 +1000)]
gitlab CI: drop custom scheduled handling, set FDO_FORCE_REBUILD instead

This is a leftover from pre-ci-templates days. Now that ci-templates handles
FDO_FORCE_REBUILD remove the custom handling and for the weekly rebuild just
set that variable to 1 in the scheduled pipeline itself.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agotools: change the error message for missing tools
Peter Hutterer [Wed, 1 Jul 2020 00:43:16 +0000 (10:43 +1000)]
tools: change the error message for missing tools

Given that some people appear to not read until the "is not installed" part of
the error message, let's reduce the error message to just that part. This may
be confusing where a user mistypes the actual command but that happens rarely
compared to those that can't run libinput record because it's in a different
package.

Fixes #500

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agomeson.build: don't install the quirks in a further 'quirks' subdirectory
Peter Hutterer [Wed, 1 Jul 2020 00:52:10 +0000 (10:52 +1000)]
meson.build: don't install the quirks in a further 'quirks' subdirectory

install_subdir() by default also copies the 'quirks' directory, resulting in
the quirks files being in <datadir>/libinput/quirks/*.quirks as opposed to the
previous <datadir>/libinput/*.quirks.

Fixes 727dc44b045974699be53d07464867d3183c6eef

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agogitlab CI: move the MR check to the deploy stage
Peter Hutterer [Tue, 30 Jun 2020 00:39:58 +0000 (10:39 +1000)]
gitlab CI: move the MR check to the deploy stage

This gives the developer enough time to file an MR after pushing a branch.
Having this run in the first stage means we get false positives because no MR
has been filed yet when the job is run.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agodoc: don't ship the .doctree files with the documentation
Peter Hutterer [Thu, 25 Jun 2020 23:27:47 +0000 (09:27 +1000)]
doc: don't ship the .doctree files with the documentation

They're build artifacts and not needed for the actual documentation. Tell
sphinx-build to generate those files in a custom directory that's not part
of the documentation.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoAdd quirks file for Sony Vaio Laptop
John Rodriguez [Wed, 17 Jun 2020 13:33:08 +0000 (13:33 +0000)]
Add quirks file for Sony Vaio Laptop

The file contains pressure overrides for the VPCEG series.
Signed-off-by: John Rodriguez <johrodri@optonline.net>
4 years agomeson.build: use install_subdir() to install the quirks files
Peter Hutterer [Tue, 16 Jun 2020 23:43:54 +0000 (09:43 +1000)]
meson.build: use install_subdir() to install the quirks files

This removes the need to check whether the files were added in meson.build but
requires litest to traverse the source dir now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoReplace strneq() with strstartswith() for variable prefixes
Peter Hutterer [Tue, 16 Jun 2020 23:37:07 +0000 (09:37 +1000)]
Replace strneq() with strstartswith() for variable prefixes

Leaving in-place all those where we know the length of the prefix, but
replacing all those where we were calling strlen on the prefix.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoutils: add strstartswith() and strendswith() utility functions
Peter Hutterer [Tue, 16 Jun 2020 22:58:44 +0000 (08:58 +1000)]
utils: add strstartswith() and strendswith() utility functions

Modeled after Python's str.startswith() and str.endswith()

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
4 years agoquirks: fix Apple external trackpad v2 thresholds
Yariv Barkan [Sat, 13 Jun 2020 14:34:59 +0000 (17:34 +0300)]
quirks: fix Apple external trackpad v2 thresholds

The external Apple "Magic" trackpads, both the first and the second
generations, have pretty good built-in spurious touch filtering. For
these device models libinput's own filtering is not required. Using low
enough values such as 20:10 effectively disables libinput's filtering.

Signed-off-by: Yariv Barkan <oigevald+libinput@gmail.com>
5 years agogitlab CI: check merge requests for the allow collaboration checkbox
Peter Hutterer [Mon, 15 Jun 2020 10:50:29 +0000 (20:50 +1000)]
gitlab CI: check merge requests for the allow collaboration checkbox

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
5 years agogitlab CI: use ci-fairy for commit message checks
Peter Hutterer [Mon, 15 Jun 2020 10:14:05 +0000 (20:14 +1000)]
gitlab CI: use ci-fairy for commit message checks

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
5 years agotools: per-slot-delta: if a NONE touch gets data, assume it's starting
Peter Hutterer [Wed, 3 Jun 2020 06:21:10 +0000 (16:21 +1000)]
tools: per-slot-delta: if a NONE touch gets data, assume it's starting

If we have a recording that started after the touch down, let's start that
touch on the first x/y position update.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
5 years agotools: per-slot-delta: construct the right InputEvent
Peter Hutterer [Wed, 3 Jun 2020 06:11:47 +0000 (16:11 +1000)]
tools: per-slot-delta: construct the right InputEvent

d107d5 broke this tool because the InputEvent was our local datastructure,
which needed the evbit redirect.

Fixes d107d58cd25c0e322d3d0a7d68feddcdb9e5e58f

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