Commit graph

21 commits

Author SHA1 Message Date
Peter Hutterer
3927b63207 cosmetic: more duplicate empty line removal
This should be it now, finally...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-02 16:48:51 +10:00
Peter Hutterer
72cc601007 test: add protocol A touch screen tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-03-02 12:45:47 +10:00
Stephen Chandler Paul
2af608cf02 Rename functions for left handed device configurations
Some devices require more than just flipping around the buttons, such as
tablets.
When it comes to devices like tablets, because the position of the palm rest is
on the right, the entire tablet has to be flipped around in order to be usable
by lefties. As such, this requires that we reverse the coordinates of the
tablets in addition to flipping the buttons on the tablet. As such, renaming
these functions so that they aren't specific to devices where only the buttons
are flipped seems appropriate.

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-15 10:17:57 +10:00
Peter Hutterer
c605276984 Merge branch 'for-peter' of git://people.freedesktop.org/~jwrdegoede/libinput 2014-11-07 11:03:12 +10:00
Peter Hutterer
d2842893a8 test: add the MS surface touch cover device and fake-mt tests
In the device description, define the interfaces for touch down/move even
though we technically don't have those interfaces. Makes it easier to test.

The fake-mt tests make sure the device shows up correctly and that no touch
events are being sent for touch events.
This device is a pointer device too, the pointer tests will test it for
correct functionality of the REL_X/Y bits, no special test needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-11-06 15:37:48 +10:00
Peter Hutterer
9b9a6a75fa test: add some left-handed tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-26 10:17:41 +10:00
Peter Hutterer
ea00ff9114 Change calibration into a configuration option
New configuration API:
	libinput_device_config_calibration_has_matrix()
	libinput_device_config_calibration_set_matrix()
	libinput_device_config_calibration_get_matrix()
	libinput_device_config_calibration_get_default_matrix()

Deprecates libinput_device_calibrate().

For coordinate transformation, we're using a precalculated matrix. Thus, to
support ..._get_matrix() we need to store the original user-specified matrix
separately, in an unmangled state.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-01 11:23:54 +10:00
Peter Hutterer
a888a7a61c test: add tests for touch calibration
Basic tests for rotation, translation and scaling events.

Note that tests need to be added separately for single-touch and touch
devices, this is a restriction of the litest framework.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-01 11:23:54 +10:00
Peter Hutterer
125e98a1f8 style fix: Remove duplicate empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-07-22 09:00:45 +10:00
Peter Hutterer
9de131f082 test: fix x/y resolution for a test device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-07-16 14:29:44 +10:00
Peter Hutterer
d03488f4a3 test: prefix custom test devices with "litest"
Follow-up from 6c4778f891

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-07-04 07:57:59 +10:00
Jonas Ådahl
f3084e2c0d Use floating point numbers instead of fixed point numbers
Fixed point numbers can easily overflow, and double to fixed point
conversion is lossy. Use floating point (double) where fixed point
numbers where previously used and remove the li_fixed_t type.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-06-09 20:46:53 +02:00
Peter Hutterer
54431242ce test: fix a couple of memleaks in the tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-04-23 12:43:23 +10:00
Jonas Ådahl
2b63c7c872 test: Check that libinput doesn't send double touch down/up events
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-04-23 00:07:40 +02:00
Jonas Ådahl
f8e8a265fe test: Test handling of many touch points
libinput currently handles 16 per device touch points. Test that we
behave as expected when a device has an even higher number of active
touch points.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-04-23 00:07:37 +02:00
Peter Hutterer
4802a792b3 test: fix memleak in touch test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-04-10 11:11:56 +10:00
Jonas Ådahl
3bee64a845 test: Use generic test device API in touch_abs_transform test
Instead of having a test device which only purpose is to test absolute
coordinate transformation, use the litest_create_device_with_overrides()
API to create a specially crafted wacom touch device with high
resolution.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-04-08 23:07:49 +02:00
Peter Hutterer
2001443100 test: plug a couple of memory leaks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-27 08:46:47 +10:00
Jonas Ådahl
6f0ca1a386 Split up the touch event into the different touch types
Instead of having one touch events representing different types of touch
events by providing a touch type, have one separate event type per touch
type. This means the LIBINPUT_EVENT_TYPE_TOUCH is replaced with
LIBINPUT_EVENT_TYPE_TOUCH_DOWN, LIBINPUT_EVENT_TYPE_TOUCH_MOTION,
LIBINPUT_EVENT_TYPE_TOUCH_UP and LIBINPUT_EVENT_TYPE_TOUCH_CANCEL.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-02-26 19:32:33 +01:00
Jonas Ådahl
ad24bc07f8 test: Add scale li_fixed overflow test
Add a test case and test device that checks if the scale transform can
handle high resolution devices and output monitor resolutions.

The test case is created in a way that it will fail if the coordinate
transform expression will overflow if only 32 bit integer data
containers are used.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-20 11:30:08 +10:00
Peter Hutterer
05cc4a8ca8 test: add a simple touch test
Currently testing for touch frame events only

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-22 11:32:01 +10:00