libinput 1.0RC1

This commit is contained in:
Peter Hutterer 2015-08-21 11:36:58 +10:00
parent 83d26eb5cf
commit b9843a4adc
5 changed files with 7 additions and 133 deletions

1
.gitignore vendored
View File

@ -20,3 +20,4 @@
/libinput-0.19.0.tar.xz
/libinput-0.20.0.tar.xz
/libinput-0.21.0.tar.xz
/libinput-0.99.1.tar.xz

View File

@ -1,81 +0,0 @@
From 323357335db0a470fdcc7fe4f1929aac2154e214 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 5 Aug 2015 10:55:39 +1000
Subject: [PATCH libinput] evdev: split scroll threshold and direction lock
threshold into two
The previous code used a 5mm threshold before axis events were posted. This
threshold was on top of the 2mm 2fg threshold (and timeout handling) in the
gesture code and effectively prevented events from being sent after a timeout,
or in the 2mm-5mm range.
We still want a directional lock though, so split the two out. The default 5mm
threshold is set to 0 for touchpads since we have our own handling of the
threshold there. The directional lock only applies once scrollin has started
and remains on 5mm.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
src/evdev-mt-touchpad.c | 5 +++--
src/evdev.c | 5 +++--
src/evdev.h | 1 +
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index a683d9a..872da98 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -1628,8 +1628,9 @@ tp_init_scroll(struct tp_dispatch *tp, struct evdev_device *device)
tp->scroll.method = tp_scroll_get_default_method(tp);
tp->device->base.config.scroll_method = &tp->scroll.config_method;
- /* In mm for touchpads with valid resolution, see tp_init_accel() */
- tp->device->scroll.threshold = 5.0;
+ /* In mm for touchpads with valid resolution, see tp_init_accel() */
+ tp->device->scroll.threshold = 0.0;
+ tp->device->scroll.direction_lock_threshold = 5.0;
return 0;
}
diff --git a/src/evdev.c b/src/evdev.c
index 17c2604..53ebf9d 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2146,6 +2146,7 @@ evdev_device_create(struct libinput_seat *seat,
device->pending_event = EVDEV_NONE;
device->devname = libevdev_get_name(device->evdev);
device->scroll.threshold = 5.0; /* Default may be overridden */
+ device->scroll.direction_lock_threshold = 5.0; /* Default may be overridden */
device->scroll.direction = 0;
device->scroll.wheel_click_angle =
evdev_read_wheel_click_prop(device);
@@ -2414,12 +2415,12 @@ evdev_post_scroll(struct evdev_device *device,
trigger speed to start scrolling in the other direction */
} else if (!evdev_is_scrolling(device,
LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL)) {
- if (fabs(delta->y) >= device->scroll.threshold)
+ if (fabs(delta->y) >= device->scroll.direction_lock_threshold)
evdev_start_scrolling(device,
LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL);
} else if (!evdev_is_scrolling(device,
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL)) {
- if (fabs(delta->x) >= device->scroll.threshold)
+ if (fabs(delta->x) >= device->scroll.direction_lock_threshold)
evdev_start_scrolling(device,
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL);
}
diff --git a/src/evdev.h b/src/evdev.h
index be5df0d..65c5a41 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -166,6 +166,7 @@ struct evdev_device {
void (*change_scroll_method)(struct evdev_device *device);
bool button_scroll_active;
double threshold;
+ double direction_lock_threshold;
uint32_t direction;
struct normalized_coords buildup;
--
2.4.3

View File

@ -1,45 +0,0 @@
From 254f87564f485ff44b8426cac3ac7f8efc47e681 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 4 Aug 2015 15:08:25 +1000
Subject: [PATCH libinput] filter: fix acceleration threshold assignment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The new values were in units/us and didn't make the switch back to ms in
8a6825f1602.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
---
src/filter.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/filter.c b/src/filter.c
index 2506ee2..e11d58a 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -78,6 +78,7 @@ filter_get_speed(struct motion_filter *filter)
*/
#define DEFAULT_THRESHOLD 0.4 /* in units/ms */
+#define MINIMUM_THRESHOLD 0.2 /* in units/ms */
#define DEFAULT_ACCELERATION 2.0 /* unitless factor */
#define DEFAULT_INCLINE 1.1 /* unitless factor */
@@ -333,9 +334,9 @@ accelerator_set_speed(struct motion_filter *filter,
assert(speed >= -1.0 && speed <= 1.0);
/* delay when accel kicks in */
- accel_filter->threshold = DEFAULT_THRESHOLD - speed / 4000.0;
- if (accel_filter->threshold < 0.0002)
- accel_filter->threshold = 0.0002;
+ accel_filter->threshold = DEFAULT_THRESHOLD - speed / 4.0;
+ if (accel_filter->threshold < MINIMUM_THRESHOLD)
+ accel_filter->threshold = MINIMUM_THRESHOLD;
/* adjust max accel factor */
accel_filter->accel = DEFAULT_ACCELERATION + speed * 1.5;
--
2.4.3

View File

@ -4,8 +4,8 @@
%global gitversion 58abea394
Name: libinput
Version: 0.21.0
Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
Version: 0.99.1
Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
Summary: Input device library
License: MIT
@ -21,10 +21,6 @@ Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}
# Not upstream, keep until kernel 4.2 or 4.1.x with dbf3c37086
Patch01: 0001-touchpad-serial-synaptics-need-to-fake-new-touches-o.patch
Patch02: 0001-filter-fix-acceleration-threshold-assignment.patch
# Bug 1249365 - Two finger scrolling is insensitive for small movements, then too sensitive
Patch03: 0001-evdev-split-scroll-threshold-and-direction-lock-thre.patch
BuildRequires: git
BuildRequires: autoconf automake libtool pkgconfig
BuildRequires: libevdev-devel
@ -101,6 +97,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%changelog
* Fri Aug 21 2015 Peter Hutterer <peter.hutterer@redhat.com> 0.99.1-1
- libinput 1.0RC1
* Wed Aug 05 2015 Peter Hutterer <peter.hutterer@redhat.com> 0.21.0-3
- Fix 2fg scroll threshold handling (#1249365)

View File

@ -1 +1 @@
f91d8f4ced986f1ae16d52ea02bc7837 libinput-0.21.0.tar.xz
8be98cb916d8e7b230ec31f6e9cb97c2 libinput-0.99.1.tar.xz