libinput: Changes to 'ubuntu'
configure.ac | 4
debian/changelog | 26
debian/control | 30
debian/libinput-tools.install | 2
debian/patches/fix-premature-flushing-of-evdev-event-on-mx4.patch | 19
debian/patches/touch-point-orientation-size.patch | 24
doc/device-configuration-via-udev.dox | 18
doc/palm-detection.dox | 5
doc/svg/edge-scrolling.svg | 2
doc/svg/twofinger-scrolling.svg | 2
src/evdev-mt-touchpad-gestures.c | 2
src/evdev-mt-touchpad.c | 6
src/evdev.c | 63 +
src/evdev.h | 1
src/libinput-util.h | 2
src/libinput.c | 2
test/Makefile.am | 2
test/gestures.c | 8
test/litest-device-asus-rog-gladius.c | 334 ++++++++++
test/litest-device-mouse-wheel-click-angle.c | 74 ++
test/litest.c | 65 +
test/litest.h | 19
test/pointer.c | 34 -
test/touchpad.c | 99 ++
tools/event-debug.c | 18
udev/90-libinput-model-quirks.hwdb | 12
26 files changed, 776 insertions(+), 97 deletions(-)
New commits:
commit b4654b3daaca631c1fc058c61a690090f022fb47
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Dec 17 16:15:58 2015 +0200
release to xenial
diff --git a/debian/changelog b/debian/changelog
index da38120..31d6954 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-libinput (1.1.3-1ubuntu1) UNRELEASED; urgency=medium
+libinput (1.1.3-1ubuntu1) xenial; urgency=medium
* Merge from debian.
* patches: Refreshed.
- -- Timo Aaltonen <tjaalton@debian.org> Thu, 17 Dec 2015 16:12:19 +0200
+ -- Timo Aaltonen <tjaalton@debian.org> Thu, 17 Dec 2015 16:15:47 +0200
libinput (1.1.3-1) unstable; urgency=medium
commit 80fffb5d25fe6432f9dd8d9388126c9ca9751c2d
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Dec 17 16:14:53 2015 +0200
add libinput-tools.install..
diff --git a/debian/libinput-tools.install b/debian/libinput-tools.install
new file mode 100644
index 0000000..68671de
--- /dev/null
+++ b/debian/libinput-tools.install
@@ -0,0 +1,2 @@
+usr/bin/*
+usr/share/man/man1/*
commit 6e9a9ed2e27d0109ac0ad9a64e0dfeb32d64d821
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Dec 17 16:13:42 2015 +0200
refresh patches
diff --git a/debian/changelog b/debian/changelog
index 0e5b5ef..da38120 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libinput (1.1.3-1ubuntu1) UNRELEASED; urgency=medium
+
+ * Merge from debian.
+ * patches: Refreshed.
+
+ -- Timo Aaltonen <tjaalton@debian.org> Thu, 17 Dec 2015 16:12:19 +0200
+
libinput (1.1.3-1) unstable; urgency=medium
[ Andreas Boll ]
diff --git a/debian/patches/fix-premature-flushing-of-evdev-event-on-mx4.patch b/debian/patches/fix-premature-flushing-of-evdev-event-on-mx4.patch
index 790c144..e1fb1d6 100644
--- a/debian/patches/fix-premature-flushing-of-evdev-event-on-mx4.patch
+++ b/debian/patches/fix-premature-flushing-of-evdev-event-on-mx4.patch
@@ -15,20 +15,9 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
test/touch.c | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 115 insertions(+), 5 deletions(-)
-diff --git a/src/evdev.c b/src/evdev.c
-index 04df275..3e22aa9 100644
--- a/src/evdev.c
+++ b/src/evdev.c
-@@ -557,7 +557,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
- static enum evdev_key_type
- get_key_type(uint16_t code)
- {
-- if (code == BTN_TOUCH)
-+ if (code >= BTN_DIGI && code <= BTN_TOOL_QUADTAP)
- return EVDEV_KEY_TYPE_NONE;
-
- if (code >= KEY_ESC && code <= KEY_MICMUTE)
-@@ -630,16 +630,16 @@ evdev_process_key(struct evdev_device *device,
+@@ -654,16 +654,16 @@ evdev_process_key(struct evdev_device *d
if (e->value == 2)
return;
@@ -49,11 +38,9 @@ index 04df275..3e22aa9 100644
/* Ignore key release events from the kernel for keys that libinput
* never got a pressed event for. */
if (e->value == 0) {
-diff --git a/test/touch.c b/test/touch.c
-index 875d94d..0e7f893 100644
--- a/test/touch.c
+++ b/test/touch.c
-@@ -912,6 +912,114 @@ START_TEST(touch_point_no_minor_or_orientation)
+@@ -912,6 +912,114 @@ START_TEST(touch_point_no_minor_or_orien
}
END_TEST
@@ -175,5 +162,3 @@ index 875d94d..0e7f893 100644
+
+ litest_add_no_device("touch:special events", touchscreen_with_btn_tool_finger_on_down);
}
--- 2.5.0 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
-
diff --git a/debian/patches/touch-point-orientation-size.patch b/debian/patches/touch-point-orientation-size.patch
index fedb5d5..7094de7 100644
--- a/debian/patches/touch-point-orientation-size.patch
+++ b/debian/patches/touch-point-orientation-size.patch
@@ -588,7 +588,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
switch (device->pending_event) {
case EVDEV_NONE:
-@@ -314,7 +419,7 @@ evdev_flush_pending_event(struct evdev_d
+@@ -324,7 +429,7 @@ evdev_flush_pending_event(struct evdev_d
if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
break;
@@ -597,7 +597,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
log_bug_kernel(libinput,
"%s: Driver sent multiple touch down for the "
"same slot",
-@@ -323,38 +428,50 @@ evdev_flush_pending_event(struct evdev_d
+@@ -333,38 +438,50 @@ evdev_flush_pending_event(struct evdev_d
}
seat_slot = ffs(~seat->slot_map) - 1;
@@ -658,7 +658,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
if (seat_slot == -1)
break;
-@@ -386,7 +503,13 @@ evdev_flush_pending_event(struct evdev_d
+@@ -396,7 +513,13 @@ evdev_flush_pending_event(struct evdev_d
point = device->abs.point;
transform_absolute(device, &point);
@@ -673,7 +673,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
break;
case EVDEV_ABSOLUTE_MOTION:
point = device->abs.point;
-@@ -398,8 +521,13 @@ evdev_flush_pending_event(struct evdev_d
+@@ -408,8 +531,13 @@ evdev_flush_pending_event(struct evdev_d
if (seat_slot == -1)
break;
@@ -689,7 +689,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
} else if (device->seat_caps & EVDEV_DEVICE_POINTER) {
pointer_notify_motion_absolute(base, time, &point);
}
-@@ -559,8 +687,9 @@ evdev_process_touch(struct evdev_device
+@@ -583,8 +711,9 @@ evdev_process_touch(struct evdev_device
struct input_event *e,
uint64_t time)
{
@@ -701,7 +701,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
if ((size_t)e->value >= device->mt.slots_len) {
log_bug_libinput(device->base.seat->libinput,
"%s exceeds slots (%d of %zd)\n",
-@@ -571,8 +700,7 @@ evdev_process_touch(struct evdev_device
+@@ -595,8 +724,7 @@ evdev_process_touch(struct evdev_device
}
evdev_flush_pending_event(device, time);
device->mt.slot = e->value;
@@ -711,7 +711,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
if (device->pending_event != EVDEV_NONE &&
device->pending_event != EVDEV_ABSOLUTE_MT_MOTION)
evdev_flush_pending_event(device, time);
-@@ -580,17 +708,34 @@ evdev_process_touch(struct evdev_device
+@@ -604,17 +732,34 @@ evdev_process_touch(struct evdev_device
device->pending_event = EVDEV_ABSOLUTE_MT_DOWN;
else
device->pending_event = EVDEV_ABSOLUTE_MT_UP;
@@ -756,7 +756,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
}
}
-@@ -1944,6 +2089,20 @@ evdev_configure_mt_device(struct evdev_d
+@@ -1969,6 +2114,20 @@ evdev_configure_mt_device(struct evdev_d
slots[slot].point.y = libevdev_get_slot_value(evdev,
slot,
ABS_MT_POSITION_Y);
@@ -777,7 +777,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
}
device->mt.slots = slots;
device->mt.slots_len = num_slots;
-@@ -2014,6 +2173,15 @@ evdev_configure_device(struct evdev_devi
+@@ -2039,6 +2198,15 @@ evdev_configure_device(struct evdev_devi
return -1;
}
@@ -795,7 +795,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
--- a/src/evdev.h
+++ b/src/evdev.h
-@@ -112,6 +112,8 @@ enum evdev_device_model {
+@@ -113,6 +113,8 @@ enum evdev_device_model {
struct mt_slot {
int32_t seat_slot;
struct device_coords point;
@@ -804,7 +804,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
};
struct evdev_device {
-@@ -128,6 +130,8 @@ struct evdev_device {
+@@ -129,6 +131,8 @@ struct evdev_device {
int fd;
struct {
const struct input_absinfo *absinfo_x, *absinfo_y;
@@ -813,7 +813,7 @@ Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
int fake_resolution;
struct device_coords point;
-@@ -349,6 +353,26 @@ double
+@@ -350,6 +354,26 @@ double
evdev_device_transform_y(struct evdev_device *device,
double y,
uint32_t height);
commit c471942a7d85b4a2249930514562d175a898b959
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Dec 17 15:00:03 2015 +0200
release to unstable
diff --git a/debian/changelog b/debian/changelog
index 00c58ea..288102e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-libinput (1.1.3-1) UNRELEASED; urgency=medium
+libinput (1.1.3-1) unstable; urgency=medium
[ Andreas Boll ]
* Change maintainer to Debian X Strike Force.
@@ -6,7 +6,7 @@ libinput (1.1.3-1) UNRELEASED; urgency=medium
[ Timo Aaltonen ]
* New upstream release.
- -- Andreas Boll <andreas.boll.dev@gmail.com> Fri, 06 Nov 2015 09:49:11 +0100
+ -- Timo Aaltonen <tjaalton@debian.org> Thu, 17 Dec 2015 14:54:35 +0200
libinput (1.1.2-1) unstable; urgency=medium
commit 0b5642c78b4ec0e911aabc6c272a5c174331cf9d
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Dec 17 14:53:48 2015 +0200
update the version
diff --git a/debian/changelog b/debian/changelog
index 01b471d..00c58ea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,11 @@
-libinput (1.1.2-2) UNRELEASED; urgency=medium
+libinput (1.1.3-1) UNRELEASED; urgency=medium
+ [ Andreas Boll ]
* Change maintainer to Debian X Strike Force.
+ [ Timo Aaltonen ]
+ * New upstream release.
+
-- Andreas Boll <andreas.boll.dev@gmail.com> Fri, 06 Nov 2015 09:49:11 +0100
libinput (1.1.2-1) unstable; urgency=medium
commit 6922adba058c5adc27161700835208415ad8818f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Dec 16 07:19:30 2015 +1000
configure.ac: libinput 1.1.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index 51350bb..92f3e22 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], [2])
+m4_define([libinput_micro_version], [3])
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=16:2:6
+LIBINPUT_LT_VERSION=16:3:6
AC_SUBST(LIBINPUT_LT_VERSION)
AM_SILENT_RULES([yes])
commit 53c28a7d75a0a22bc96d780b9082fd6d8d3ed741
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Dec 11 11:10:25 2015 +1000
touchpad: add a special quirk for the Lenovo x220 with updated firmware
If an x220 is updated to the touchpad firmware version 8.1, the touchpad
suffers from the same issues as the x230 and needs custom acceleration code.
Unfortunately we cannot detect this otherwise, so it is left to the user as a
custom hwdb setting.
https://bugzilla.redhat.com/show_bug.cgi?id=1264453
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
diff --git a/doc/device-configuration-via-udev.dox b/doc/device-configuration-via-udev.dox
index 85c5c9c..6e9a3dc 100644
--- a/doc/device-configuration-via-udev.dox
+++ b/doc/device-configuration-via-udev.dox
@@ -117,4 +117,22 @@ defaults or any other reason. The effects of setting these properties, the
format of the property and the value of the property are subject to change
at any time.
+@subsection model_specific_configuration_x220fw81 Lenovo x220 with touchpad firmware v8.1
+
+The property <b>LIBINPUT_MODEL_LENOVO_X220_TOUCHPAD_FW81</b> may be set by a
+user in a local hwdb file. This property designates the touchpad on a Lenovo
+x220 with a touchpad firmware version 8.1. When this firmware version is
+installed, the touchpad is imprecise. The touchpad device does not send
+continuos x/y axis position updates, a behavior also observed on its
+successor model, the Lenovo x230 which has the same firmware version. If the
+above property is set, libinput adjusts its behavior to better suit this
+particular model.
+
+The touchpad firmware version cannot be detected automatically by libinput,
+local configuration is required to set this property. Refer to the libinput
+model quirks hwdb for instructions.
+
+This property must not be used for any other purpose, no specific behavior
+is guaranteed.
+
*/
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 4fba147..d78a54b 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -1565,7 +1565,8 @@ tp_init_accel(struct tp_dispatch *tp, double diagonal)
tp->accel.x_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_x;
tp->accel.y_scale_coeff = (DEFAULT_MOUSE_DPI/25.4) / res_y;
- if (tp->device->model_flags & EVDEV_MODEL_LENOVO_X230)
+ if (tp->device->model_flags & EVDEV_MODEL_LENOVO_X230 ||
+ tp->device->model_flags & EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81)
filter = create_pointer_accelerator_filter_lenovo_x230(tp->device->dpi);
else
filter = create_pointer_accelerator_filter_touchpad(tp->device->dpi);
diff --git a/src/evdev.c b/src/evdev.c
index 55641c5..9fecdc4 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1650,6 +1650,7 @@ evdev_read_model_flags(struct evdev_device *device)
enum evdev_device_model model;
} model_map[] = {
{ "LIBINPUT_MODEL_LENOVO_X230", EVDEV_MODEL_LENOVO_X230 },
+ { "LIBINPUT_MODEL_LENOVO_X220_TOUCHPAD_FW81", EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 },
{ "LIBINPUT_MODEL_CHROMEBOOK", EVDEV_MODEL_CHROMEBOOK },
{ "LIBINPUT_MODEL_SYSTEM76_BONOBO", EVDEV_MODEL_SYSTEM76_BONOBO },
{ "LIBINPUT_MODEL_SYSTEM76_GALAGO", EVDEV_MODEL_SYSTEM76_GALAGO },
diff --git a/src/evdev.h b/src/evdev.h
index e44a65d..36bf7b4 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -107,6 +107,7 @@ enum evdev_device_model {
EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD = (1 << 9),
EVDEV_MODEL_JUMPING_SEMI_MT = (1 << 10),
EVDEV_MODEL_ELANTECH_TOUCHPAD = (1 << 11),
+ EVDEV_MODEL_LENOVO_X220_TOUCHPAD_FW81 = (1 << 12),
};
struct mt_slot {
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
index cf4fbfa..814ec40 100644
--- a/udev/90-libinput-model-quirks.hwdb
+++ b/udev/90-libinput-model-quirks.hwdb
@@ -67,6 +67,18 @@ libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus*
# LENOVO
##########################################
+# X220 after a bios update updating the touchpad firmware version to 8.1
+# See https://bugzilla.redhat.com/show_bug.cgi?id=1264453 for details
+# If the touchpad is unresponsive and dmesg includes this line
+# psmouse serio1: synaptics: Touchpad model: 1, fw: 8.1 [...]
+# then copy the two lines below into a new file
+# /etc/udev/hwdb.d/90-libinput-x220-touchpad-fw81.hwdb, then run
+# sudo udevadm hwdb --update and reboot.
+#
+# Copy the two lines below:
+#libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX220*
+# LIBINPUT_MODEL_LENOVO_X220_TOUCHPAD_FW81=1
+
# X230 (Tablet)
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*:pvrThinkPadX230*
LIBINPUT_MODEL_LENOVO_X230=1
commit 874a9153b932fbc525bf11012ac2155fff084d82
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Dec 14 07:33:31 2015 +1000
util: drop trailing semicolon from CASE_RETURN_STRING macro
Avoid empty statements and force the caller to terminate the macro.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/libinput-util.h b/src/libinput-util.h
index ba253b5..a627e5d 100644
--- a/src/libinput-util.h
+++ b/src/libinput-util.h
@@ -43,7 +43,7 @@
/* The HW DPI rate we normalize to before calculating pointer acceleration */
#define DEFAULT_MOUSE_DPI 1000
-#define CASE_RETURN_STRING(a) case a: return #a;
+#define CASE_RETURN_STRING(a) case a: return #a
/*
* This list data structure is a verbatim copy from wayland-util.h from the
commit a4ac2bebb310ded75707860f942aea73a9a7cc5f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Dec 11 15:34:50 2015 +1000
test: extend sendfile from 4kB to 40kB
The file is already larger than 4k, so we ended up truncating the file for the
tests. This went unnoticed until recent additions that ended up truncating it
halfway through an assignment.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/test/litest.c b/test/litest.c
index 52679df..fc188b6 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -956,7 +956,7 @@ litest_copy_file(const char *dest, const char *src, const char *header)
in = open(src, O_RDONLY);
litest_assert_int_gt(in, -1);
/* lazy, just check for error and empty file copy */
- litest_assert_int_gt(sendfile(out, in, NULL, 4096), 0);
+ litest_assert_int_gt(sendfile(out, in, NULL, 40960), 0);
close(out);
close(in);
}
commit 98913e50e3b1a5f8af15599bef84e7d03ecd0bb6
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date: Fri Nov 6 09:49:19 2015 +0100
Change maintainer to Debian X Strike Force.
diff --git a/debian/changelog b/debian/changelog
index 3273adc..01b471d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libinput (1.1.2-2) UNRELEASED; urgency=medium
+
+ * Change maintainer to Debian X Strike Force.
+
+ -- Andreas Boll <andreas.boll.dev@gmail.com> Fri, 06 Nov 2015 09:49:11 +0100
+
libinput (1.1.2-1) unstable; urgency=medium
* New upstream release.
diff --git a/debian/control b/debian/control
index 78d16cc..1ed5059 100644
--- a/debian/control
+++ b/debian/control
@@ -1,8 +1,8 @@
Source: libinput
Section: libs
Priority: optional
-Maintainer: Emilio Pozuelo Monfort <pochu@debian.org>
-Uploaders: Hector Oron <zumbi@debian.org>
+Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
+Uploaders: Emilio Pozuelo Monfort <pochu@debian.org>, Hector Oron <zumbi@debian.org>
Build-Depends:
debhelper (>= 9),
dh-autoreconf,
commit 8d76734fb6b91429602bc48e10ae2c5a8b7bf2b8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Dec 10 16:05:37 2015 +1000
test: change extra axes to take a percentage as well
More flexible than having values that are device-specific.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/test/litest.c b/test/litest.c
index 35b8551..52679df 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -1255,7 +1255,8 @@ litest_event(struct litest_device *d, unsigned int type,
}
static bool
-axis_replacement_value(struct axis_replacement *axes,
+axis_replacement_value(struct litest_device *d,
+ struct axis_replacement *axes,
int32_t evcode,
int32_t *value)
{
@@ -1266,7 +1267,7 @@ axis_replacement_value(struct axis_replacement *axes,
while (axis->evcode != -1) {
if (axis->evcode == evcode) {
- *value = axis->value;
+ *value = litest_scale(d, evcode, axis->value);
return true;
}
axis++;
@@ -1307,7 +1308,7 @@ litest_auto_assign_value(struct litest_device *d,
value = touching ? 0 : 1;
break;
default:
- if (!axis_replacement_value(axes, ev->code, &value) &&
+ if (!axis_replacement_value(d, axes, ev->code, &value) &&
d->interface->get_axis_default)
d->interface->get_axis_default(d, ev->code, &value);
break;
@@ -1671,17 +1672,36 @@ litest_keyboard_key(struct litest_device *d, unsigned int key, bool is_press)
litest_button_click(d, key, is_press);
}
+static int
+litest_scale_axis(const struct litest_device *d,
+ unsigned int axis,
+ double val)
+{
+ const struct input_absinfo *abs;
+
+ litest_assert_double_ge(val, 0.0);
+ litest_assert_double_le(val, 100.0);
+
+ abs = libevdev_get_abs_info(d->evdev, axis);
+ litest_assert_notnull(abs);
+
+ return (abs->maximum - abs->minimum) * val/100.0 + abs->minimum;
+}
+
int
litest_scale(const struct litest_device *d, unsigned int axis, double val)
{
int min, max;
litest_assert_double_ge(val, 0.0);
litest_assert_double_le(val, 100.0);
- litest_assert_int_le(axis, (unsigned int)ABS_Y);
- min = d->interface->min[axis];
- max = d->interface->max[axis];
- return (max - min) * val/100.0 + min;
+ if (axis <= ABS_Y) {
+ min = d->interface->min[axis];
+ max = d->interface->max[axis];
+ return (max - min) * val/100.0 + min;
+ } else {
+ return litest_scale_axis(d, axis, val);
+ }
}
void
diff --git a/test/touchpad.c b/test/touchpad.c
index 7bc99e9..dab2781 100644
--- a/test/touchpad.c
+++ b/test/touchpad.c
@@ -2983,7 +2983,7 @@ START_TEST(touchpad_thumb_begin_no_motion)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
@@ -3007,7 +3007,7 @@ START_TEST(touchpad_thumb_update_no_motion)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
@@ -3033,7 +3033,7 @@ START_TEST(touchpad_thumb_moving)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
@@ -3062,7 +3062,7 @@ START_TEST(touchpad_thumb_clickfinger)
struct libinput_event *event;
struct libinput_event_pointer *ptrev;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
@@ -3119,7 +3119,7 @@ START_TEST(touchpad_thumb_btnarea)
struct libinput_event *event;
struct libinput_event_pointer *ptrev;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
@@ -3155,7 +3155,7 @@ START_TEST(touchpad_thumb_edgescroll)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
@@ -3186,7 +3186,7 @@ START_TEST(touchpad_thumb_tap_begin)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
@@ -3219,7 +3219,7 @@ START_TEST(touchpad_thumb_tap_touch)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
@@ -3252,7 +3252,7 @@ START_TEST(touchpad_thumb_tap_hold)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
@@ -3286,7 +3286,7 @@ START_TEST(touchpad_thumb_tap_hold_2ndfg)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
@@ -3337,7 +3337,7 @@ START_TEST(touchpad_thumb_tap_hold_2ndfg_tap)
struct libinput_event *event;
struct libinput_event_pointer *ptrev;
struct axis_replacement axes[] = {
- { ABS_MT_PRESSURE, 190 },
+ { ABS_MT_PRESSURE, 75 },
{ -1, 0 }
};
commit 24f86d48d979ea2ab159d4a362fcb85f1f300e7f
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Dec 10 10:50:51 2015 +0200
release to unstable
diff --git a/debian/changelog b/debian/changelog
index e42407c..3273adc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-libinput (1.1.2-1) UNRELEASED; urgency=medium
+libinput (1.1.2-1) unstable; urgency=medium
* New upstream release.
* control: Add a package for libinput-tools, thanks Alessio Treglia!
(Closes: #806985)
* control: Update long descriptions.
- -- Timo Aaltonen <tjaalton@debian.org> Thu, 10 Dec 2015 08:14:50 +0200
+ -- Timo Aaltonen <tjaalton@debian.org> Thu, 10 Dec 2015 08:34:16 +0200
libinput (1.1.0-1) unstable; urgency=medium
commit 6e614e7bee9fea9e9f9530f4d0d1c5ae602fc559
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Dec 1 15:26:48 2015 +1000
test: use the double comparison macros
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit d070463a72c5c1fe6c8ece7a1cec23df68bed25d)
diff --git a/test/litest.c b/test/litest.c
index cf9b534..35b8551 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -1675,8 +1675,8 @@ int
litest_scale(const struct litest_device *d, unsigned int axis, double val)
{
int min, max;
- litest_assert_int_ge((int)val, 0);
- litest_assert_int_le((int)val, 100);
+ litest_assert_double_ge(val, 0.0);
+ litest_assert_double_le(val, 100.0);
litest_assert_int_le(axis, (unsigned int)ABS_Y);
min = d->interface->min[axis];
commit 33981394aa5d49ed55a48efd6bbfe71628ac2e9a
Author: Stephen Chandler Paul <thatslyude@gmail.com>
Date: Wed Jun 11 20:16:04 2014 -0400
test: Add litest_assert_double_*() macros
Converts two doubles to 24.8 fixed-width integers so assertions can be made with
doubles in tests
Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9d96286a44f90091638fc7f1242530da60849188)
diff --git a/test/litest.h b/test/litest.h
index ed23c8a..1268e10 100644
--- a/test/litest.h
+++ b/test/litest.h
@@ -404,6 +404,23 @@ struct libevdev_uinput * litest_create_uinput_abs_device(const char *name,
struct input_id *id,
const struct input_absinfo *abs,
...);
+#define litest_assert_double_eq(a_, b_)\
+ ck_assert_int_eq((int)(a_ * 256), (int)(b_ * 256))
+
+#define litest_assert_double_ne(a_, b_)\
+ ck_assert_int_ne((int)(a_ * 256), (int)(b_ * 256))
+
+#define litest_assert_double_lt(a_, b_)\
+ ck_assert_int_lt((int)(a_ * 256), (int)(b_ * 256))
+
+#define litest_assert_double_le(a_, b_)\
+ ck_assert_int_le((int)(a_ * 256), (int)(b_ * 256))
+
+#define litest_assert_double_gt(a_, b_)\
+ ck_assert_int_gt((int)(a_ * 256), (int)(b_ * 256))
+
+#define litest_assert_double_ge(a_, b_)\
+ ck_assert_int_ge((int)(a_ * 256), (int)(b_ * 256))
void litest_timeout_tap(void);
void litest_timeout_tapndrag(void);
commit 374f267ba7980fc6ae436f9d65509e81c1fc6935
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Dec 10 08:34:10 2015 +0200
control: Update long descriptions.
diff --git a/debian/changelog b/debian/changelog
index 09eedb8..e42407c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ libinput (1.1.2-1) UNRELEASED; urgency=medium
* New upstream release.
* control: Add a package for libinput-tools, thanks Alessio Treglia!
(Closes: #806985)
+ * control: Update long descriptions.
-- Timo Aaltonen <tjaalton@debian.org> Thu, 10 Dec 2015 08:14:50 +0200
diff --git a/debian/control b/debian/control
index ea260af..78d16cc 100644
--- a/debian/control
+++ b/debian/control
@@ -30,6 +30,8 @@ Description: input device management and event handling library - shared library
processing and abstraction so minimize the amount of custom input
code the user of libinput need to provide the common set of
functionality that users expect.
+ .
+ This package includes the shared library.
Package: libinput10-udeb
XC-Package-Type: udeb
@@ -58,6 +60,8 @@ Description: input device management and event handling library - debugging symb
processing and abstraction so minimize the amount of custom input
code the user of libinput need to provide the common set of
functionality that users expect.
+ .
+ This package includes the debugging symbols.
Package: libinput-dev
Section: libdevel
@@ -76,6 +80,8 @@ Description: input device management and event handling library - development fi
processing and abstraction so minimize the amount of custom input
code the user of libinput need to provide the common set of
functionality that users expect.
+ .
+ This package includes the development headers.
Package: libinput-tools
Section: libdevel
commit bc61a202b1878ae56e2331c1b4099c4e4a6e154e
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Dec 10 08:29:01 2015 +0200
control: Add a package for libinput-tools, thanks Alessio Treglia! (Closes: #806985)
diff --git a/debian/changelog b/debian/changelog
index 6e01dcc..09eedb8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
libinput (1.1.2-1) UNRELEASED; urgency=medium
* New upstream release.
+ * control: Add a package for libinput-tools, thanks Alessio Treglia!
+ (Closes: #806985)
-- Timo Aaltonen <tjaalton@debian.org> Thu, 10 Dec 2015 08:14:50 +0200
diff --git a/debian/control b/debian/control
index 108f666..ea260af 100644
--- a/debian/control
+++ b/debian/control
@@ -76,3 +76,23 @@ Description: input device management and event handling library - development fi
processing and abstraction so minimize the amount of custom input
code the user of libinput need to provide the common set of
functionality that users expect.
+
+Package: libinput-tools
+Section: libdevel
+Priority: extra
+Architecture: any
+Multi-Arch: allowed
+Depends:
+ libinput10 (= ${binary:Version}),
+ ${shlibs:Depends},
+ ${misc:Depends},
+Description: input device management and event handling library - command line tools
+ libinput is a library that handles input devices for display servers and
+ other applications that need to directly deal with input devices.
+ .
+ It provides device detection, device handling, input device event
+ processing and abstraction so minimize the amount of custom input
+ code the user of libinput need to provide the common set of
+ functionality that users expect.
+ .
+ This package includes the command line tools.
commit a2fccdfd773df53f59522ed1151844dc1efc276b
Author: Timo Aaltonen <tjaalton@debian.org>
Date: Thu Dec 10 08:17:22 2015 +0200
update the changelog
diff --git a/debian/changelog b/debian/changelog
index 9d32bc8..6e01dcc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libinput (1.1.2-1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+
+ -- Timo Aaltonen <tjaalton@debian.org> Thu, 10 Dec 2015 08:14:50 +0200
+
libinput (1.1.0-1) unstable; urgency=medium
* New upstream release.
commit f5d0b9b99b16c3e72b2a6851a14b49a30106cbb9
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Dec 9 09:08:10 2015 +1000
configure.ac: libinput 1.1.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index c841a5f..51350bb 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], [1])
+m4_define([libinput_micro_version], [2])
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=16:1:6
+LIBINPUT_LT_VERSION=16:2:6
AC_SUBST(LIBINPUT_LT_VERSION)
AM_SILENT_RULES([yes])
commit 147162da696715fbe7f9c19b31472c090cedc721
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Dec 4 15:52:17 2015 +1000
touchpad: don't set the axis for a 0.0 value in a scroll event
Once we trigger diagonal scrolling, the device's scroll direction is set as
horiz+vert. From then on, both axes will be set on every subsequent scroll
event, even when the actual delta for an axis is 0.
This causes continuous scroll stop events in clients that care about these
things.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
diff --git a/src/evdev.c b/src/evdev.c
index 4933185..55641c5 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2548,9 +2548,16 @@ evdev_post_scroll(struct evdev_device *device,
if (!normalized_is_zero(event)) {
const struct discrete_coords zero_discrete = { 0.0, 0.0 };
+ uint32_t axes = device->scroll.direction;
+
+ if (event.y == 0.0)
+ axes &= ~AS_MASK(LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL);
+ if (event.x == 0.0)
+ axes &= ~AS_MASK(LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL);
+
evdev_notify_axis(device,
time,
- device->scroll.direction,
+ axes,
source,
&event,
&zero_discrete);
diff --git a/test/touchpad.c b/test/touchpad.c
index e024ace..7bc99e9 100644
--- a/test/touchpad.c
+++ b/test/touchpad.c
@@ -144,6 +144,54 @@ START_TEST(touchpad_2fg_scroll)
}
END_TEST
+START_TEST(touchpad_2fg_scroll_diagonal)
+{
+ struct litest_device *dev = litest_current_device();
+ struct libinput *li = dev->libinput;
+ struct libinput_event *event;
+ struct libinput_event_pointer *ptrev;
+ int i;
Reply to: