libinput: Changes to 'debian-unstable'
.gitignore | 1
configure.ac | 17
debian/changelog | 8
debian/control | 1
debian/libinput10.symbols | 52
doc/Makefile.am | 1
doc/absolute-axes.dox | 18
doc/device-configuration-via-udev.dox | 4
doc/gestures.dox | 38
doc/normalization-of-relative-motion.dox | 4
doc/page-hierarchy.dox | 4
doc/pointer-acceleration.dox | 6
doc/svg/gesture-2fg-ambiguity.svg | 496 ++++
doc/svg/pinch-gestures-softbuttons.svg | 365 +++
doc/svg/tablet-axes.svg | 564 ++++
doc/svg/tablet-out-of-bounds.svg | 271 ++
doc/svg/tablet.svg | 199 +
doc/tablet-support.dox | 211 +
doc/tapping.dox | 6
doc/touchpad-tap-state-machine.svg | 1467 ++++++------
src/Makefile.am | 4
src/evdev-mt-touchpad-buttons.c | 27
src/evdev-mt-touchpad-edge-scroll.c | 5
src/evdev-mt-touchpad-gestures.c | 339 +-
src/evdev-mt-touchpad-tap.c | 57
src/evdev-mt-touchpad.c | 93
src/evdev-mt-touchpad.h | 38
src/evdev-tablet.c | 1675 ++++++++++++++
src/evdev-tablet.h | 204 +
src/evdev.c | 52
src/evdev.h | 21
src/filter.c | 94
src/filter.h | 3
src/libinput-private.h | 100
src/libinput-util.h | 41
src/libinput.c | 823 ++++++
src/libinput.h | 1011 ++++++++
src/libinput.sym | 55
test/Makefile.am | 13
test/device.c | 39
test/gestures.c | 860 +++++++
test/litest-device-huion-pentablet.c | 113
test/litest-device-synaptics-hover.c | 2
test/litest-device-wacom-bamboo-tablet.c | 119 +
test/litest-device-wacom-cintiq-24hd.c | 147 +
test/litest-device-wacom-cintiq-tablet.c | 158 +
test/litest-device-wacom-intuos-tablet.c | 163 +
test/litest-device-wacom-isdv4-tablet.c | 112
test/litest-device-waltop-tablet.c | 241 ++
test/litest-int.h | 8
test/litest.c | 173 +
test/litest.h | 582 +++-
test/misc.c | 114
test/pointer.c | 10
test/tablet.c | 3680 +++++++++++++++++++++++++++++++
test/touchpad-tap.c | 294 ++
test/touchpad.c | 84
test/valgrind.suppressions | 18
tools/event-debug.c | 234 +
tools/event-gui.c | 236 +
tools/libinput-list-devices.c | 16
tools/shared.c | 16
tools/shared.h | 1
63 files changed, 14516 insertions(+), 1292 deletions(-)
New commits:
commit 6cf2055a5970032e3814c513bee892ad6233064d
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Tue Feb 23 16:23:34 2016 +0200
release to unstable
diff --git a/debian/changelog b/debian/changelog
index 6fa92cb..f092320 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-libinput (1.2.0-1) UNRELEASED; urgency=medium
+libinput (1.2.0-1) unstable; urgency=medium
* New upstream release.
* control: Add libwacom-dev to build-depends.
* symbols: Updated.
- -- Timo Aaltonen <tjaalton@debian.org> Tue, 23 Feb 2016 16:13:08 +0200
+ -- Timo Aaltonen <tjaalton@debian.org> Tue, 23 Feb 2016 16:23:11 +0200
libinput (1.1.7-1) unstable; urgency=medium
commit b04a6d17138a20fc24fdc5f15784934bb702bdd9
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Tue Feb 23 16:21:28 2016 +0200
symbols: Updated.
diff --git a/debian/changelog b/debian/changelog
index e2b0938..6fa92cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ libinput (1.2.0-1) UNRELEASED; urgency=medium
* New upstream release.
* control: Add libwacom-dev to build-depends.
+ * symbols: Updated.
-- Timo Aaltonen <tjaalton@debian.org> Tue, 23 Feb 2016 16:13:08 +0200
diff --git a/debian/libinput10.symbols b/debian/libinput10.symbols
index c1103df..ee42245 100644
--- a/debian/libinput10.symbols
+++ b/debian/libinput10.symbols
@@ -7,6 +7,7 @@ libinput.so.10 libinput10 #MINVER#
LIBINPUT_0.20.0@LIBINPUT_0.20.0 0.21.0
LIBINPUT_0.21.0@LIBINPUT_0.21.0 0.21.0
LIBINPUT_1.1@LIBINPUT_1.1 1.1.0
+ LIBINPUT_1.2@LIBINPUT_1.2 1.2.0-1
libinput_config_status_to_str@LIBINPUT_0.12.0 0.15.0
libinput_device_config_accel_get_default_profile@LIBINPUT_1.1 1.1.0
libinput_device_config_accel_get_default_speed@LIBINPUT_0.12.0 0.15.0
@@ -51,11 +52,14 @@ libinput.so.10 libinput10 #MINVER#
libinput_device_config_send_events_get_mode@LIBINPUT_0.12.0 0.15.0
libinput_device_config_send_events_get_modes@LIBINPUT_0.12.0 0.15.0
libinput_device_config_send_events_set_mode@LIBINPUT_0.12.0 0.15.0
+ libinput_device_config_tap_get_default_drag_enabled@LIBINPUT_1.2 1.2.0
libinput_device_config_tap_get_default_drag_lock_enabled@LIBINPUT_0.19.0 0.21.0
libinput_device_config_tap_get_default_enabled@LIBINPUT_0.12.0 0.15.0
libinput_device_config_tap_get_enabled@LIBINPUT_0.12.0 0.15.0
+ libinput_device_config_tap_get_drag_enabled@LIBINPUT_1.2 1.2.0
libinput_device_config_tap_get_drag_lock_enabled@LIBINPUT_0.19.0 0.21.0
libinput_device_config_tap_get_finger_count@LIBINPUT_0.12.0 0.15.0
+ libinput_device_config_tap_set_drag_enabled@LIBINPUT_1.2 1.2.0
libinput_device_config_tap_set_drag_lock_enabled@LIBINPUT_0.19.0 0.21.0
libinput_device_config_tap_set_enabled@LIBINPUT_0.12.0 0.15.0
libinput_device_get_context@LIBINPUT_0.12.0 0.15.0
@@ -101,6 +105,7 @@ libinput.so.10 libinput10 #MINVER#
libinput_event_get_gesture_event@LIBINPUT_0.20.0 0.21.0
libinput_event_get_keyboard_event@LIBINPUT_0.12.0 0.15.0
libinput_event_get_pointer_event@LIBINPUT_0.12.0 0.15.0
+ libinput_event_get_tablet_tool_event@LIBINPUT_1.2 1.2.0
libinput_event_get_touch_event@LIBINPUT_0.12.0 0.15.0
libinput_event_get_type@LIBINPUT_0.12.0 0.15.0
libinput_event_keyboard_get_base_event@LIBINPUT_0.12.0 0.15.0
@@ -127,6 +132,38 @@ libinput.so.10 libinput10 #MINVER#
libinput_event_pointer_get_time@LIBINPUT_0.12.0 0.15.0
libinput_event_pointer_get_time_usec@LIBINPUT_0.21.0 0.21.0
libinput_event_pointer_has_axis@LIBINPUT_0.12.0 0.15.0
+ libinput_event_tablet_tool_distance_has_changed@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_base_event@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_button@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_button_state@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_distance@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_dx@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_dy@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_pressure@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_proximity_state@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_rotation@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_seat_button_count@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_slider_position@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_tilt_x@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_tilt_y@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_time@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_time_usec@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_tip_state@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_tool@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_wheel_delta@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_wheel_delta_discrete@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_x@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_x_transformed@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_y@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_get_y_transformed@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_pressure_has_changed@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_rotation_has_changed@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_slider_has_changed@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_tilt_x_has_changed@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_tilt_y_has_changed@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_wheel_has_changed@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_x_has_changed@LIBINPUT_1.2 1.2.0
+ libinput_event_tablet_tool_y_has_changed@LIBINPUT_1.2 1.2.0
libinput_event_touch_get_base_event@LIBINPUT_0.12.0 0.15.0
libinput_event_touch_get_seat_slot@LIBINPUT_0.12.0 0.15.0
libinput_event_touch_get_slot@LIBINPUT_0.12.0 0.15.0
@@ -157,6 +194,21 @@ libinput.so.10 libinput10 #MINVER#
libinput_seat_unref@LIBINPUT_0.12.0 0.15.0
libinput_set_user_data@LIBINPUT_0.12.0 0.15.0
libinput_suspend@LIBINPUT_0.12.0 0.15.0
+ libinput_tablet_tool_get_serial@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_get_tool_id@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_get_type@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_get_user_data@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_has_button@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_has_distance@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_has_pressure@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_has_rotation@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_has_slider@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_has_tilt@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_has_wheel@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_is_unique@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_ref@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_set_user_data@LIBINPUT_1.2 1.2.0
+ libinput_tablet_tool_unref@LIBINPUT_1.2 1.2.0
libinput_udev_assign_seat@LIBINPUT_0.12.0 0.15.0
libinput_udev_create_context@LIBINPUT_0.12.0 0.15.0
libinput_unref@LIBINPUT_0.12.0 0.15.0
commit e0caabcf00b000ea354b04ff393fec3726cb9948
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Tue Feb 23 16:21:05 2016 +0200
control: Add libwacom-dev to build-depends.
diff --git a/debian/changelog b/debian/changelog
index 3c8b6f2..e2b0938 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libinput (1.2.0-1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+ * control: Add libwacom-dev to build-depends.
+
+ -- Timo Aaltonen <tjaalton@debian.org> Tue, 23 Feb 2016 16:13:08 +0200
+
libinput (1.1.7-1) unstable; urgency=medium
* New upstream release
diff --git a/debian/control b/debian/control
index 1ed5059..cee8a83 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,7 @@ Build-Depends:
libmtdev-dev (>= 1.1.0),
libudev-dev,
libevdev-dev (>= 0.4),
+ libwacom-dev (>= 0.12),
Standards-Version: 3.9.6
Vcs-Git: git://anonscm.debian.org/pkg-xorg/lib/libinput.git
Vcs-Browser: http://anonscm.debian.org/cgit/pkg-xorg/lib/libinput.git
commit 45e5847bf3e755532b2b6a62b74b85fcdadf2e36
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Feb 23 16:13:03 2016 +1000
configure.ac: libinput 1.2.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index 3eec57d..d400f21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
AC_PREREQ([2.64])
m4_define([libinput_major_version], [1])
-m4_define([libinput_minor_version], [1])
-m4_define([libinput_micro_version], [902])
+m4_define([libinput_minor_version], [2])
+m4_define([libinput_micro_version], [0])
m4_define([libinput_version],
[libinput_major_version.libinput_minor_version.libinput_micro_version])
@@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
# b) If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1:0:A+1
# c) If the interface is the same as the previous version, change to C:R+1:A
-LIBINPUT_LT_VERSION=17:1:7
+LIBINPUT_LT_VERSION=17:2:7
AC_SUBST(LIBINPUT_LT_VERSION)
AM_SILENT_RULES([yes])
commit 0e17dc58aa2469909d9e21d889ff119b6170e15a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Feb 18 09:42:27 2016 +1000
tablet: use the tilt resolution if we have it
A nonzero resolution on the tilt axes is units/rad so we can calculate the
physical min/max based. Uneven min/max ranges are supported.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 1e5c2cd..22ea1eb 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -231,16 +231,25 @@ adjust_tilt(const struct input_absinfo *absinfo)
double value = (absinfo->value - absinfo->minimum) / range;
const int WACOM_MAX_DEGREES = 64;
- /* Map to the (-1, 1) range */
- value = (value * 2) - 1;
-
- /* Wacom supports physical [-64, 64] degrees, so map to that by
- * default. If other tablets have a different physical range or
- * nonzero physical offsets, they need extra treatment
- * here.
- */
+ /* If resolution is nonzero, it's in units/radian. But require
+ * a min/max less/greater than zero so we can assume 0 is the
+ * center */
+ if (absinfo->resolution != 0 &&
+ absinfo->maximum > 0 &&
+ absinfo->minimum < 0) {
+ value = 180.0/M_PI * absinfo->value/absinfo->resolution;
+ } else {
+ /* Wacom supports physical [-64, 64] degrees, so map to that by
+ * default. If other tablets have a different physical range or
+ * nonzero physical offsets, they need extra treatment
+ * here.
+ */
+ /* Map to the (-1, 1) range */
+ value = (value * 2) - 1;
+ value *= WACOM_MAX_DEGREES;
+ }
- return value * WACOM_MAX_DEGREES;
+ return value;
}
static inline int32_t
diff --git a/test/tablet.c b/test/tablet.c
index c5dc892..ad6ac45 100644
--- a/test/tablet.c
+++ b/test/tablet.c
@@ -3298,7 +3298,8 @@ START_TEST(tilt_x)
ck_assert_double_ge(tx, -52);
ty = libinput_event_tablet_tool_get_tilt_y(tev);
- ck_assert_double_eq(ty, -64);
+ ck_assert_double_ge(ty, -65);
+ ck_assert_double_lt(ty, -63);
libinput_event_destroy(event);
@@ -3320,7 +3321,8 @@ START_TEST(tilt_x)
ck_assert_double_le(tx, expected_tx + 2);
ty = libinput_event_tablet_tool_get_tilt_y(tev);
- ck_assert_double_eq(ty, -64);
+ ck_assert_double_ge(ty, -65);
+ ck_assert_double_lt(ty, -63);
libinput_event_destroy(event);
@@ -3365,7 +3367,8 @@ START_TEST(tilt_y)
ck_assert_double_ge(ty, -52);
tx = libinput_event_tablet_tool_get_tilt_x(tev);
- ck_assert_double_eq(tx, -64);
+ ck_assert_double_ge(tx, -65);
+ ck_assert_double_lt(tx, -63);
libinput_event_destroy(event);
@@ -3387,7 +3390,8 @@ START_TEST(tilt_y)
ck_assert_double_le(ty, expected_ty + 2);
tx = libinput_event_tablet_tool_get_tilt_x(tev);
- ck_assert_double_eq(tx, -64);
+ ck_assert_double_ge(tx, -65);
+ ck_assert_double_lt(tx, -63);
libinput_event_destroy(event);
commit 79139ebcd1cc81eecdd2d0dc6f006fbec4c2c6f2
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Feb 15 17:02:45 2016 +1000
touchpad: move the tapping exclusion zone to the top edge of the button
We previously used the half-way mark of the touchpad's y axis to decide where
to ignore tapping. Move this down to the top edge of the software buttons
instead. Users may tap with a finger in the software button areas, on the rest
of the touchpad it's unlikely that they tap within 5% of the edge.
On touchpads with physical buttons or if clickfinger is enabled, the
no-tapping zone extends to the bottom of the touchpad. This required splitting
the tests into clickfinger, softbuttons and hardbuttons.
https://bugs.freedesktop.org/show_bug.cgi?id=93947
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 912a0f0..95d650a 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -538,9 +538,9 @@ tp_palm_tap_is_palm(const struct tp_dispatch *tp, const struct tp_touch *t)
t->point.x < tp->palm.right_edge)
return false;
- /* We're inside the left/right palm edge and in the northern half of
- * the touchpad - this tap is a palm */
- if (t->point.y < tp->palm.vert_center) {
+ /* We're inside the left/right palm edge and not in one of the
+ * software button areas */
+ if (t->point.y < tp->buttons.bottom_area.top_edge) {
log_debug(tp_libinput_context(tp),
"palm: palm-tap detected\n");
return true;
@@ -1824,14 +1824,12 @@ static int
tp_init_palmdetect(struct tp_dispatch *tp,
struct evdev_device *device)
{
- int width, height;
+ int width;
tp->palm.right_edge = INT_MAX;
tp->palm.left_edge = INT_MIN;
- tp->palm.vert_center = INT_MIN;
width = device->abs.dimensions.x;
- height = device->abs.dimensions.y;
/* Wacom doesn't have internal touchpads */
if (device->model_flags & EVDEV_MODEL_WACOM_TOUCHPAD)
@@ -1845,7 +1843,6 @@ tp_init_palmdetect(struct tp_dispatch *tp,
/* palm edges are 5% of the width on each side */
tp->palm.right_edge = device->abs.absinfo_x->maximum - width * 0.05;
tp->palm.left_edge = device->abs.absinfo_x->minimum + width * 0.05;
- tp->palm.vert_center = device->abs.absinfo_y->minimum + height/2;
tp->palm.monitor_trackpoint = true;
diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h
index 87d34b2..eae327b 100644
--- a/src/evdev-mt-touchpad.h
+++ b/src/evdev-mt-touchpad.h
@@ -321,7 +321,6 @@ struct tp_dispatch {
struct {
int32_t right_edge; /* in device coordinates */
int32_t left_edge; /* in device coordinates */
- int32_t vert_center; /* in device coordinates */
bool trackpoint_active;
struct libinput_event_listener trackpoint_listener;
diff --git a/test/touchpad.c b/test/touchpad.c
index 3574edd..be9c566 100644
--- a/test/touchpad.c
+++ b/test/touchpad.c
@@ -1031,7 +1031,7 @@ START_TEST(touchpad_palm_detect_no_palm_moving_into_edges)
}
END_TEST
-START_TEST(touchpad_palm_detect_tap)
+START_TEST(touchpad_palm_detect_tap_hardbuttons)
{
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
@@ -1051,7 +1051,38 @@ START_TEST(touchpad_palm_detect_tap)
litest_touch_up(dev, 0);
litest_assert_empty_queue(li);
- litest_touch_down(dev, 0, 5, 90);
+ litest_touch_down(dev, 0, 5, 99);
+ litest_touch_up(dev, 0);
+ litest_assert_empty_queue(li);
+
+ litest_touch_down(dev, 0, 95, 99);
+ litest_touch_up(dev, 0);
+ litest_assert_empty_queue(li);
+}
+END_TEST
+
+START_TEST(touchpad_palm_detect_tap_softbuttons)
+{
+ struct litest_device *dev = litest_current_device();
+ struct libinput *li = dev->libinput;
+
+ if (!touchpad_has_palm_detect_size(dev))
+ return;
+
+ litest_enable_tap(dev->libinput_device);
+ litest_enable_buttonareas(dev);
+
+ litest_drain_events(li);
+
+ litest_touch_down(dev, 0, 95, 5);
+ litest_touch_up(dev, 0);
+ litest_assert_empty_queue(li);
+
+ litest_touch_down(dev, 0, 5, 5);
+ litest_touch_up(dev, 0);
+ litest_assert_empty_queue(li);
+
+ litest_touch_down(dev, 0, 5, 99);
litest_touch_up(dev, 0);
litest_assert_button_event(li,
BTN_LEFT,
@@ -1061,7 +1092,7 @@ START_TEST(touchpad_palm_detect_tap)
LIBINPUT_BUTTON_STATE_RELEASED);
litest_assert_empty_queue(li);
- litest_touch_down(dev, 0, 95, 90);
+ litest_touch_down(dev, 0, 95, 99);
litest_touch_up(dev, 0);
litest_assert_button_event(li,
BTN_LEFT,
@@ -1073,6 +1104,37 @@ START_TEST(touchpad_palm_detect_tap)
}
END_TEST
+START_TEST(touchpad_palm_detect_tap_clickfinger)
+{
+ struct litest_device *dev = litest_current_device();
+ struct libinput *li = dev->libinput;
+
+ if (!touchpad_has_palm_detect_size(dev))
+ return;
+
+ litest_enable_tap(dev->libinput_device);
+ litest_enable_clickfinger(dev);
+
+ litest_drain_events(li);
+
+ litest_touch_down(dev, 0, 95, 5);
+ litest_touch_up(dev, 0);
+ litest_assert_empty_queue(li);
+
+ litest_touch_down(dev, 0, 5, 5);
+ litest_touch_up(dev, 0);
+ litest_assert_empty_queue(li);
+
+ litest_touch_down(dev, 0, 5, 99);
+ litest_touch_up(dev, 0);
+ litest_assert_empty_queue(li);
+
+ litest_touch_down(dev, 0, 95, 99);
+ litest_touch_up(dev, 0);
+ litest_assert_empty_queue(li);
+}
+END_TEST
+
START_TEST(touchpad_left_handed)
{
struct litest_device *dev = litest_current_device();
@@ -3933,7 +3995,9 @@ litest_setup_tests(void)
litest_add("touchpad:palm", touchpad_palm_detect_palm_becomes_pointer, LITEST_TOUCHPAD, LITEST_ANY);
litest_add("touchpad:palm", touchpad_palm_detect_palm_stays_palm, LITEST_TOUCHPAD, LITEST_ANY);
litest_add("touchpad:palm", touchpad_palm_detect_no_palm_moving_into_edges, LITEST_TOUCHPAD, LITEST_ANY);
- litest_add("touchpad:palm", touchpad_palm_detect_tap, LITEST_TOUCHPAD, LITEST_ANY);
+ litest_add("touchpad:palm", touchpad_palm_detect_tap_hardbuttons, LITEST_TOUCHPAD, LITEST_CLICKPAD);
+ litest_add("touchpad:palm", touchpad_palm_detect_tap_softbuttons, LITEST_CLICKPAD, LITEST_ANY);
+ litest_add("touchpad:palm", touchpad_palm_detect_tap_clickfinger, LITEST_CLICKPAD, LITEST_ANY);
litest_add("touchpad:palm", touchpad_no_palm_detect_at_edge_for_edge_scrolling, LITEST_TOUCHPAD, LITEST_CLICKPAD);
litest_add("touchpad:left-handed", touchpad_left_handed, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_CLICKPAD);
commit d6b889852abd3e5f238769be55cb4a30e5db6dcb
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Feb 17 09:06:09 2016 +1000
touchpad: add synaptics semi-mt devices to those needing hysteresis
https://bugs.freedesktop.org/show_bug.cgi?id=94097
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index d8b2334..912a0f0 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -1991,17 +1991,28 @@ tp_init_hysteresis(struct tp_dispatch *tp)
{
int res_x, res_y;
+ if (tp->device->model_flags & EVDEV_MODEL_CYAPA)
+ goto want_hysteresis;
+
+ if (tp->device->model_flags & EVDEV_MODEL_ALPS_RUSHMORE)
+ goto want_hysteresis;
+
+ if (tp->semi_mt &&
+ (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD))
+ goto want_hysteresis;
+
+ tp->hysteresis_margin.x = 0;
+ tp->hysteresis_margin.y = 0;
+
+ return;
+
+want_hysteresis:
res_x = tp->device->abs.absinfo_x->resolution;
res_y = tp->device->abs.absinfo_y->resolution;
- if (tp->device->model_flags &
- (EVDEV_MODEL_CYAPA|EVDEV_MODEL_ALPS_RUSHMORE)) {
- tp->hysteresis_margin.x = res_x/2;
- tp->hysteresis_margin.y = res_y/2;
- } else {
- tp->hysteresis_margin.x = 0;
- tp->hysteresis_margin.y = 0;
- }
+ tp->hysteresis_margin.x = res_x/2;
+ tp->hysteresis_margin.y = res_y/2;
+ return;
}
static int
commit cc0c3e85988c25b6f637d27979c93283b8224224
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Feb 15 17:13:01 2016 +1000
configure.ac: libinput 1.2rc2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index b20a5c8..3eec57d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ AC_PREREQ([2.64])
m4_define([libinput_major_version], [1])
m4_define([libinput_minor_version], [1])
-m4_define([libinput_micro_version], [901])
+m4_define([libinput_micro_version], [902])
m4_define([libinput_version],
[libinput_major_version.libinput_minor_version.libinput_micro_version])
@@ -31,7 +31,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
# b) If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1:0:A+1
# c) If the interface is the same as the previous version, change to C:R+1:A
-LIBINPUT_LT_VERSION=17:0:7
+LIBINPUT_LT_VERSION=17:1:7
AC_SUBST(LIBINPUT_LT_VERSION)
AM_SILENT_RULES([yes])
commit 3d1b17e1fdc89ebf479dc14ac02ccd5f28b0ad93
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Feb 11 14:32:33 2016 +1000
test: add tablet test for out-of-bounds motion coordinates
The newer Cintiqs have a minimum value of 400/400 advertised by the kernel but
the actual sensor goes past the 0/0 origin. Test this, make sure that a value
outside the boundaries generates negative mm values.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/doc/svg/tablet-out-of-bounds.svg b/doc/svg/tablet-out-of-bounds.svg
new file mode 100644
index 0000000..83e5021
--- /dev/null
+++ b/doc/svg/tablet-out-of-bounds.svg
@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="134.12477mm"
+ height="73.121971mm"
+ viewBox="0 0 475.24525 259.0936"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="tablet-out-of-bounds.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.6"
+ inkscape:cx="105.43109"
+ inkscape:cy="265.46934"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1136"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0">
+ <sodipodi:guide
+ position="63.6133,240.91614"
+ orientation="0,1"
+ id="guide4164" />
+ <sodipodi:guide
+ position="61.08792,13.126743"
+ orientation="0,1"
+ id="guide4166" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="tablet"
+ inkscape:groupmode="layer"
+ id="layer1"
+ style="display:inline"
+ transform="translate(-139.42736,-156.36219)">
+ <rect
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.9201867;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:3.68074643, 0.92018661;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4136"
+ width="474.32504"
+ height="258.1734"
+ x="139.88745"
+ y="156.82228"
+ rx="5" />
+ <rect
+ y="175.42407"
+ x="199.33878"
+ height="226.52563"
+ width="357.34042"
+ id="rect4140"
+ style="opacity:0.92000002;fill:#a44d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.74800003;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ <g
+ id="g7041"
+ transform="translate(12,0)">
+ <g
+ transform="matrix(0.53265351,0,0,0.53265351,92.308091,96.440418)"
+ id="g7023">
+ <circle
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.98900002;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:3.956, 0.989;stroke-dashoffset:0;stroke-opacity:1"
+ id="path4158"
+ cx="135.61298"
+ cy="287.06125"
+ r="22.98097" />
+ <ellipse
+ cy="287.06125"
+ cx="135.61298"
+ id="circle4160"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.52043104;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:2.08172421, 0.52043105;stroke-dashoffset:0;stroke-opacity:1"
+ rx="11.5985"
+ ry="12.608653" />
+ </g>
+ <rect
+ rx="0.5"
+ y="268.93671"
+ x="163.8243"
+ height="8.9902887"
+ width="13.786156"
+ id="rect4162"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.29022256;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.16089031, 0.29022258;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ rx="0.5"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.29022256;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.16089031, 0.29022258;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7027"
+ width="13.786156"
+ height="8.9902887"
+ x="163.8243"
+ y="280.97675" />
+ <rect
+ rx="0.5"
+ y="293.01678"
+ x="163.8243"
+ height="8.9902887"
+ width="13.786156"
+ id="rect7029"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.29022256;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.16089031, 0.29022258;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ rx="0.5"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.44849709;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.79398834, 0.44849708;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7031"
+ width="9.1119308"
+ height="32.483532"
+ x="149.90343"
+ y="269.44443" />
+ <rect
+ rx="0.5"
+ y="269.44443"
+ x="137.90343"
+ height="32.483532"
+ width="9.1119308"
+ id="rect7033"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.44849709;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.79398834, 0.44849708;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ rx="0.5"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.19463234;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.77852936, 0.19463234;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7035"
+ width="9.3657951"
+ height="5.9516821"
+ x="137.77649"
+ y="256.10321" />
+ <rect
+ rx="0.5"
+ y="246.10321"
+ x="137.77649"
+ height="5.9516821"
+ width="9.3657951"
+ id="rect7037"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.19463234;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.77852936, 0.19463234;stroke-dashoffset:0;stroke-opacity:1" />
+ <rect
+ rx="0.5"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.19463234;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.77852936, 0.19463234;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7039"
+ width="9.3657951"
+ height="5.9516821"
+ x="137.77649"
+ y="236.10321" />
+ </g>
+ <g
+ transform="matrix(-1,0,0,1,743.43474,0)"
+ id="g7054">
+ <g
+ id="g7056"
+ transform="matrix(0.53265351,0,0,0.53265351,92.308091,96.440418)">
+ <circle
+ r="22.98097"
+ cy="287.06125"
+ cx="135.61298"
+ id="circle7058"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.98900002;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:3.956, 0.989;stroke-dashoffset:0;stroke-opacity:1" />
+ <ellipse
+ ry="12.608653"
+ rx="11.5985"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.52043104;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:2.08172421, 0.52043105;stroke-dashoffset:0;stroke-opacity:1"
+ id="ellipse7060"
+ cx="135.61298"
+ cy="287.06125" />
+ </g>
+ <rect
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.29022256;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.16089031, 0.29022258;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7062"
+ width="13.786156"
+ height="8.9902887"
+ x="163.8243"
+ y="268.93671"
+ rx="0.5" />
+ <rect
+ y="280.97675"
+ x="163.8243"
+ height="8.9902887"
+ width="13.786156"
+ id="rect7064"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.29022256;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.16089031, 0.29022258;stroke-dashoffset:0;stroke-opacity:1"
+ rx="0.5" />
+ <rect
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.29022256;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.16089031, 0.29022258;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7066"
+ width="13.786156"
+ height="8.9902887"
+ x="163.8243"
+ y="293.01678"
+ rx="0.5" />
+ <rect
+ y="269.44443"
+ x="149.90343"
+ height="32.483532"
+ width="9.1119308"
+ id="rect7068"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.44849709;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.79398834, 0.44849708;stroke-dashoffset:0;stroke-opacity:1"
+ rx="0.5" />
+ <rect
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.44849709;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.79398834, 0.44849708;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7070"
+ width="9.1119308"
+ height="32.483532"
+ x="137.90343"
+ y="269.44443"
+ rx="0.5" />
+ <rect
+ y="256.10321"
+ x="137.77649"
+ height="5.9516821"
+ width="9.3657951"
+ id="rect7072"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.19463234;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.77852936, 0.19463234;stroke-dashoffset:0;stroke-opacity:1"
+ rx="0.5" />
+ <rect
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.19463234;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.77852936, 0.19463234;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7074"
+ width="9.3657951"
+ height="5.9516821"
+ x="137.77649"
+ y="246.10321"
+ rx="0.5" />
+ <rect
+ y="236.10321"
+ x="137.77649"
+ height="5.9516821"
+ width="9.3657951"
+ id="rect7076"
+ style="opacity:0.92000002;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.19463234;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.77852936, 0.19463234;stroke-dashoffset:0;stroke-opacity:1"
+ rx="0.5" />
+ </g>
+ <rect
+ style="opacity:0.92000002;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.6687212;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:2.6748846, 0.66872115;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7078"
+ width="326.1051"
+ height="198.32079"
+ x="214.95644"
+ y="189.5265" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="stylus"
+ style="display:inline"
+ transform="translate(-139.42736,-156.36219)" />
+</svg>
diff --git a/doc/tablet-support.dox b/doc/tablet-support.dox
index ff4e460..0e719b7 100644
--- a/doc/tablet-support.dox
+++ b/doc/tablet-support.dox
@@ -186,4 +186,26 @@ Intuos 3, 4, 5, Wacon Cintiq and Wacom Intuos Pro series. The tool ID can
be used to distinguish between e.g. a Wacom Classic Pen or a Wacom Pro Pen.
It is the caller's responsibility to interpret the tool ID.
+@section tablet-bounds Out-of-bounds motion events
+
+Some tablets integrated into a screen (e.g. Wacom Cintiq 24HD, 27QHD and
+13HD series, etc.) have a sensor larger than the display area. libinput uses
+the range advertised by the kernel as the valid range unless device-specific
+quirks are present. Events outside this range will produce coordinates that
+may be negative or larger than the tablet's width and/or height. It is up to
+the caller to ignore these events.
+
+@image html tablet-out-of-bounds.svg "Illustration of the out-of-bounds area on a tablet"
+
+In the image above, the display area is shown in black. The red area around
+the display illustrates the sensor area that generates input events. Events
+within this area will have negative coordinate or coordinates larger than
+the width/height of the tablet.
+
+If events outside the logical bounds of the input area are scaled into a
+custom range with libinput_event_tablet_tool_get_x_transformed() and
+libinput_event_tablet_tool_get_y_transformed() the resulting value may be
+less than 0 or larger than the upper range provided. It is up to the caller
+to test for this and handle or ignore these events accordingly.
+
*/
diff --git a/src/libinput.h b/src/libinput.h
index b14c281..cf33492 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -1562,6 +1562,9 @@ libinput_event_tablet_tool_wheel_has_changed(
* libinput_event_tablet_tool_get_x_transformed() for transforming the axis
* value into a different coordinate space.
*
+ * @note On some devices, returned value may be negative or larger than the
+ * width of the device. See @ref tablet-bounds for more details.
+ *
* @param event The libinput tablet tool event
* @return The current value of the the axis
*/
@@ -1576,6 +1579,9 @@ libinput_event_tablet_tool_get_x(struct libinput_event_tablet_tool *event);
* libinput_event_tablet_tool_get_y_transformed() for transforming the axis
* value into a different coordinate space.
*
+ * @note On some devices, returned value may be negative or larger than the
+ * width of the device. See @ref tablet-bounds for more details.
+ *
* @param event The libinput tablet tool event
* @return The current value of the the axis
*/
@@ -1754,6 +1760,9 @@ libinput_event_tablet_tool_get_wheel_delta_discrete(
* libinput_event_tablet_tool_*_has_changed() returns 0 for that axis.
* libinput always includes all device axes in the event.
*
+ * @note On some devices, returned value may be negative or larger than the
+ * width of the device. See @ref tablet-bounds for more details.
+ *
* @param event The libinput tablet tool event
* @param width The current output screen width
* @return the current absolute x coordinate transformed to a screen coordinate
@@ -1772,6 +1781,9 @@ libinput_event_tablet_tool_get_x_transformed(struct libinput_event_tablet_tool *
* libinput_event_tablet_tool_*_has_changed() returns 0 for that axis.
* libinput always includes all device axes in the event.
*
+ * @note On some devices, returned value may be negative or larger than the
+ * width of the device. See @ref tablet-bounds for more details.
+ *
* @param event The libinput tablet tool event
* @param height The current output screen height
Reply to: