[arch-commits] Commit in libinput/trunk (2 files)

2018-07-03 Thread Andreas Radke via arch-commits
Date: Tuesday, July 3, 2018 @ 16:54:12
  Author: andyrtr
Revision: 327942

upgpkg: libinput 1.11.2-1

upstream update 1.11.2

Modified:
  libinput/trunk/PKGBUILD
Deleted:
  libinput/trunk/pass_a_valid_grab_parameter_to_list-devices.patch

---+
 PKGBUILD  |   14 +---
 pass_a_valid_grab_parameter_to_list-devices.patch |   59 
 2 files changed, 5 insertions(+), 68 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2018-07-03 16:22:02 UTC (rev 327941)
+++ PKGBUILD2018-07-03 16:54:12 UTC (rev 327942)
@@ -3,8 +3,8 @@
 # Maintainer: Jan de Groot
 
 pkgname=libinput
-pkgver=1.11.1
-pkgrel=2
+pkgver=1.11.2
+pkgrel=1
 pkgdesc="Input device management and event handling library"
 url="https://www.freedesktop.org/wiki/Software/libinput/;
 arch=(x86_64)
@@ -14,17 +14,13 @@
 optdepends=('gtk3: libinput debug-gui'
 'python-pyudev: libinput measure'
 'python-evdev: libinput measure')
-source=(https://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
-pass_a_valid_grab_parameter_to_list-devices.patch)
-sha512sums=('3dd1a318c89d66f5a66016c6dbfa5277b61a8cb5337d99f85b1eeef40ed894bdc04fd4588a97383988daea0f034df5a72bff318325320a01b857db9deb94a2b0'
-'SKIP'
-
'98ced6bcc5bc0ae22fbf2c9fe74bffb79eb575f34f0e0dfb8c7b84b3e54aee94b0bfb9ba0245b19a920e4d01984f7fc26029bbb7963cbce03409ea8db2dc9d7c')
+source=(https://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
+sha512sums=('cb6ada877fc3c09f634f3db39d5507e66d4b86c3d632bb8f7498c7b01fdf8372b2053a79b641293900b7fcc0aa4e920f7c830d9c7b2d9ff3cd61c58eb7c20b65'
+'SKIP')
 validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer 
(Who-T) 
 
 prepare() {
   cd $pkgname-$pkgver
-  # fix core dump in list-devices FS#59082
-  patch -Np1 -i ../pass_a_valid_grab_parameter_to_list-devices.patch
   # Reduce docs size
   printf '%s\n' >>doc/libinput.doxygen.in \
 HAVE_DOT=yes DOT_IMAGE_FORMAT=svg INTERACTIVE_SVG=yes

Deleted: pass_a_valid_grab_parameter_to_list-devices.patch
===
--- pass_a_valid_grab_parameter_to_list-devices.patch   2018-07-03 16:22:02 UTC 
(rev 327941)
+++ pass_a_valid_grab_parameter_to_list-devices.patch   2018-07-03 16:54:12 UTC 
(rev 327942)
@@ -1,59 +0,0 @@
-From 7c51c881dc72827ca50ae9eea3d123eef9cb4a66 Mon Sep 17 00:00:00 2001
-From: Peter Hutterer 
-Date: Wed, 20 Jun 2018 07:56:05 +1000
-Subject: [PATCH] tools: pass a valid grab parameter to list-devices
-
-My kingdome for a compiler warning. Or a scan-build warning. Or a coverity
-warning. Or anything... But no, nothing.
-
-Also make the open_restricted() more robust to a NULL userdata, because
-effectively that's what we were passing here.
-
-Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/50
-
-Introduced in 0a13223c39fdf0f079715bf83d498c0dcd9cf4f8
-
-Signed-off-by: Peter Hutterer 

- tools/libinput-list-devices.c | 3 ++-
- tools/shared.c| 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c
-index aa225ca..4cbdf77 100644
 a/tools/libinput-list-devices.c
-+++ b/tools/libinput-list-devices.c
-@@ -372,6 +372,7 @@ main(int argc, char **argv)
- {
-   struct libinput *li;
-   struct libinput_event *ev;
-+  bool grab = false;
- 
-   /* This is kept for backwards-compatibility with the old
-  libinput-list-devices */
-@@ -388,7 +389,7 @@ main(int argc, char **argv)
-   }
-   }
- 
--  li = tools_open_backend(BACKEND_UDEV, "seat0", false, false);
-+  li = tools_open_backend(BACKEND_UDEV, "seat0", false, );
-   if (!li)
-   return 1;
- 
-diff --git a/tools/shared.c b/tools/shared.c
-index d1f0270..d3fb629 100644
 a/tools/shared.c
-+++ b/tools/shared.c
-@@ -232,7 +232,7 @@ open_restricted(const char *path, int flags, void 
*user_data)
-   if (fd < 0)
-   fprintf(stderr, "Failed to open %s (%s)\n",
-   path, strerror(errno));
--  else if (*grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1)
-+  else if (grab && *grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1)
-   fprintf(stderr, "Grab requested, but failed for %s (%s)\n",
-   path, strerror(errno));
- 
---
-libgit2 0.27.1
-
-


[arch-commits] Commit in libinput/trunk (2 files)

2018-06-21 Thread Andreas Radke via arch-commits
Date: Thursday, June 21, 2018 @ 19:25:22
  Author: andyrtr
Revision: 327413

upgpkg: libinput 1.11.1-2

apply upstream fix for list-devices core dumps - FS#59082

Added:
  libinput/trunk/pass_a_valid_grab_parameter_to_list-devices.patch
Modified:
  libinput/trunk/PKGBUILD

---+
 PKGBUILD  |   10 ++-
 pass_a_valid_grab_parameter_to_list-devices.patch |   59 
 2 files changed, 66 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2018-06-21 19:03:34 UTC (rev 327412)
+++ PKGBUILD2018-06-21 19:25:22 UTC (rev 327413)
@@ -4,7 +4,7 @@
 
 pkgname=libinput
 pkgver=1.11.1
-pkgrel=1
+pkgrel=2
 pkgdesc="Input device management and event handling library"
 url="https://www.freedesktop.org/wiki/Software/libinput/;
 arch=(x86_64)
@@ -14,13 +14,17 @@
 optdepends=('gtk3: libinput debug-gui'
 'python-pyudev: libinput measure'
 'python-evdev: libinput measure')
-source=(https://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
+source=(https://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
+pass_a_valid_grab_parameter_to_list-devices.patch)
 
sha512sums=('3dd1a318c89d66f5a66016c6dbfa5277b61a8cb5337d99f85b1eeef40ed894bdc04fd4588a97383988daea0f034df5a72bff318325320a01b857db9deb94a2b0'
-'SKIP')
+'SKIP'
+
'98ced6bcc5bc0ae22fbf2c9fe74bffb79eb575f34f0e0dfb8c7b84b3e54aee94b0bfb9ba0245b19a920e4d01984f7fc26029bbb7963cbce03409ea8db2dc9d7c')
 validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer 
(Who-T) 
 
 prepare() {
   cd $pkgname-$pkgver
+  # fix core dump in list-devices FS#59082
+  patch -Np1 -i ../pass_a_valid_grab_parameter_to_list-devices.patch
   # Reduce docs size
   printf '%s\n' >>doc/libinput.doxygen.in \
 HAVE_DOT=yes DOT_IMAGE_FORMAT=svg INTERACTIVE_SVG=yes

Added: pass_a_valid_grab_parameter_to_list-devices.patch
===
--- pass_a_valid_grab_parameter_to_list-devices.patch   
(rev 0)
+++ pass_a_valid_grab_parameter_to_list-devices.patch   2018-06-21 19:25:22 UTC 
(rev 327413)
@@ -0,0 +1,59 @@
+From 7c51c881dc72827ca50ae9eea3d123eef9cb4a66 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer 
+Date: Wed, 20 Jun 2018 07:56:05 +1000
+Subject: [PATCH] tools: pass a valid grab parameter to list-devices
+
+My kingdome for a compiler warning. Or a scan-build warning. Or a coverity
+warning. Or anything... But no, nothing.
+
+Also make the open_restricted() more robust to a NULL userdata, because
+effectively that's what we were passing here.
+
+Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/50
+
+Introduced in 0a13223c39fdf0f079715bf83d498c0dcd9cf4f8
+
+Signed-off-by: Peter Hutterer 
+---
+ tools/libinput-list-devices.c | 3 ++-
+ tools/shared.c| 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/libinput-list-devices.c b/tools/libinput-list-devices.c
+index aa225ca..4cbdf77 100644
+--- a/tools/libinput-list-devices.c
 b/tools/libinput-list-devices.c
+@@ -372,6 +372,7 @@ main(int argc, char **argv)
+ {
+   struct libinput *li;
+   struct libinput_event *ev;
++  bool grab = false;
+ 
+   /* This is kept for backwards-compatibility with the old
+  libinput-list-devices */
+@@ -388,7 +389,7 @@ main(int argc, char **argv)
+   }
+   }
+ 
+-  li = tools_open_backend(BACKEND_UDEV, "seat0", false, false);
++  li = tools_open_backend(BACKEND_UDEV, "seat0", false, );
+   if (!li)
+   return 1;
+ 
+diff --git a/tools/shared.c b/tools/shared.c
+index d1f0270..d3fb629 100644
+--- a/tools/shared.c
 b/tools/shared.c
+@@ -232,7 +232,7 @@ open_restricted(const char *path, int flags, void 
*user_data)
+   if (fd < 0)
+   fprintf(stderr, "Failed to open %s (%s)\n",
+   path, strerror(errno));
+-  else if (*grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1)
++  else if (grab && *grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1)
+   fprintf(stderr, "Grab requested, but failed for %s (%s)\n",
+   path, strerror(errno));
+ 
+--
+libgit2 0.27.1
+
+


[arch-commits] Commit in libinput/trunk (2 files)

2016-06-04 Thread Laurent Carlier
Date: Saturday, June 4, 2016 @ 11:02:18
  Author: lcarlier
Revision: 268943

upgpkg: libinput 1.3.1-1

upstream update 1.3.1

Modified:
  libinput/trunk/PKGBUILD
Deleted:
  libinput/trunk/touchpad_only_use_negative_pressure_change_check.diff

---+
 PKGBUILD  |   18 +-
 touchpad_only_use_negative_pressure_change_check.diff |   42 
 2 files changed, 5 insertions(+), 55 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-06-04 08:41:59 UTC (rev 268942)
+++ PKGBUILD2016-06-04 09:02:18 UTC (rev 268943)
@@ -3,8 +3,8 @@
 # Maintainer: Jan de Groot
 
 pkgname=libinput
-pkgver=1.3.0
-pkgrel=2
+pkgver=1.3.1
+pkgrel=1
 pkgdesc="library that handles input devices for display servers and other 
applications that need to directly deal with input devices."
 arch=(i686 x86_64)
 url="http://www.freedesktop.org/wiki/Software/libinput/;
@@ -13,19 +13,11 @@
 checkdepends=('check')
 install=libinput.install
 options=('!libtool')
-source=(http://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
-touchpad_only_use_negative_pressure_change_check.diff)
-sha256sums=('998a75fb261d161efaa7da44411cdc9a32a953280e4ffc6322ca19f057d0c1ea'
-'SKIP'
-'bfc71b3c3c18ab6dc6cb076e7b0410b5f3a51aa7b7db34f7fd35dd79c9615806')
+source=(http://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
+sha256sums=('cdff653d93395c718f367af61fee866914bc45de75ac94abe7dc1b720462aca9'
+'SKIP')
 validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer 
(Who-T) 
 
-prepare() {
-  cd $pkgname-$pkgver
-  # fix slow touchpad input, FS#49397
-  patch -Np1 -i ${srcdir}/touchpad_only_use_negative_pressure_change_check.diff
-}
-
 build() {
   cd $pkgname-$pkgver
   ./configure --prefix=/usr --disable-static

Deleted: touchpad_only_use_negative_pressure_change_check.diff
===
--- touchpad_only_use_negative_pressure_change_check.diff   2016-06-04 
08:41:59 UTC (rev 268942)
+++ touchpad_only_use_negative_pressure_change_check.diff   2016-06-04 
09:02:18 UTC (rev 268943)
@@ -1,42 +0,0 @@
-From 2f5231cc88fccf389a78270d827f6c9201b86794 Mon Sep 17 00:00:00 2001
-From: Peter Hutterer 
-Date: Wed, 18 May 2016 07:35:36 +1000
-Subject: touchpad: only use negative pressure change check on Lenovo *50 and
- *60 series
-
-This was introduced for bug 94379 - an X1 Carbon 3rd. Other touchpads have
-different pressure change ranges, causing this condition to trigger
-randomly and resulting in a jerky pointer motion.
-
-For now, reduce the check to the *50 and *60 series touchpads until we have
-data for more touchpads that we can add one-by-one.
-
-https://bugs.freedesktop.org/show_bug.cgi?id=95393
-
-Signed-off-by: Peter Hutterer 
-Reviewed-by: Hans de Goede 
-
-diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
-index 4c8c3a3..c854043 100644
 a/src/evdev-mt-touchpad.c
-+++ b/src/evdev-mt-touchpad.c
-@@ -928,6 +928,7 @@ tp_detect_jumps(const struct tp_dispatch *tp, struct 
tp_touch *t)
- static void
- tp_process_state(struct tp_dispatch *tp, uint64_t time)
- {
-+  struct evdev_device *device = tp->device;
-   struct tp_touch *t;
-   unsigned int i;
-   bool restart_filter = false;
-@@ -953,7 +954,8 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time)
-   if (!t->dirty)
-   continue;
- 
--  if (t->pressure_delta < -7)
-+  if ((device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) &&
-+  t->pressure_delta < -7)
-   tp_motion_history_reset(t);
- 
-   if (tp_detect_jumps(tp, t)) {
--- 
-cgit v0.10.2


[arch-commits] Commit in libinput/trunk (2 files)

2016-05-20 Thread Andreas Radke
Date: Friday, May 20, 2016 @ 20:56:11
  Author: andyrtr
Revision: 268371

upgpkg: libinput 1.3.0-2

fix slow touchpad input; FS#49397

Added:
  libinput/trunk/touchpad_only_use_negative_pressure_change_check.diff
Modified:
  libinput/trunk/PKGBUILD

---+
 PKGBUILD  |   14 -
 touchpad_only_use_negative_pressure_change_check.diff |   42 
 2 files changed, 53 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-05-20 18:29:06 UTC (rev 268370)
+++ PKGBUILD2016-05-20 18:56:11 UTC (rev 268371)
@@ -4,7 +4,7 @@
 
 pkgname=libinput
 pkgver=1.3.0
-pkgrel=1
+pkgrel=2
 pkgdesc="library that handles input devices for display servers and other 
applications that need to directly deal with input devices."
 arch=(i686 x86_64)
 url="http://www.freedesktop.org/wiki/Software/libinput/;
@@ -13,11 +13,19 @@
 checkdepends=('check')
 install=libinput.install
 options=('!libtool')
-source=(http://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
+source=(http://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
+touchpad_only_use_negative_pressure_change_check.diff)
 sha256sums=('998a75fb261d161efaa7da44411cdc9a32a953280e4ffc6322ca19f057d0c1ea'
-'SKIP')
+'SKIP'
+'bfc71b3c3c18ab6dc6cb076e7b0410b5f3a51aa7b7db34f7fd35dd79c9615806')
 validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer 
(Who-T) 
 
+prepare() {
+  cd $pkgname-$pkgver
+  # fix slow touchpad input, FS#49397
+  patch -Np1 -i ${srcdir}/touchpad_only_use_negative_pressure_change_check.diff
+}
+
 build() {
   cd $pkgname-$pkgver
   ./configure --prefix=/usr --disable-static

Added: touchpad_only_use_negative_pressure_change_check.diff
===
--- touchpad_only_use_negative_pressure_change_check.diff   
(rev 0)
+++ touchpad_only_use_negative_pressure_change_check.diff   2016-05-20 
18:56:11 UTC (rev 268371)
@@ -0,0 +1,42 @@
+From 2f5231cc88fccf389a78270d827f6c9201b86794 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer 
+Date: Wed, 18 May 2016 07:35:36 +1000
+Subject: touchpad: only use negative pressure change check on Lenovo *50 and
+ *60 series
+
+This was introduced for bug 94379 - an X1 Carbon 3rd. Other touchpads have
+different pressure change ranges, causing this condition to trigger
+randomly and resulting in a jerky pointer motion.
+
+For now, reduce the check to the *50 and *60 series touchpads until we have
+data for more touchpads that we can add one-by-one.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=95393
+
+Signed-off-by: Peter Hutterer 
+Reviewed-by: Hans de Goede 
+
+diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
+index 4c8c3a3..c854043 100644
+--- a/src/evdev-mt-touchpad.c
 b/src/evdev-mt-touchpad.c
+@@ -928,6 +928,7 @@ tp_detect_jumps(const struct tp_dispatch *tp, struct 
tp_touch *t)
+ static void
+ tp_process_state(struct tp_dispatch *tp, uint64_t time)
+ {
++  struct evdev_device *device = tp->device;
+   struct tp_touch *t;
+   unsigned int i;
+   bool restart_filter = false;
+@@ -953,7 +954,8 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time)
+   if (!t->dirty)
+   continue;
+ 
+-  if (t->pressure_delta < -7)
++  if ((device->model_flags & EVDEV_MODEL_LENOVO_T450_TOUCHPAD) &&
++  t->pressure_delta < -7)
+   tp_motion_history_reset(t);
+ 
+   if (tp_detect_jumps(tp, t)) {
+-- 
+cgit v0.10.2


[arch-commits] Commit in libinput/trunk (2 files)

2015-06-22 Thread Jan Steffens
Date: Monday, June 22, 2015 @ 21:00:28
  Author: heftig
Revision: 241180

0.18.0

Modified:
  libinput/trunk/PKGBUILD
Deleted:
  libinput/trunk/0001-filter-require-minimum-acceleration-factor-of-0.3.patch

--+
 0001-filter-require-minimum-acceleration-factor-of-0.3.patch |   52 --
 PKGBUILD |   13 --
 2 files changed, 5 insertions(+), 60 deletions(-)

Deleted: 0001-filter-require-minimum-acceleration-factor-of-0.3.patch
===
--- 0001-filter-require-minimum-acceleration-factor-of-0.3.patch
2015-06-22 14:08:11 UTC (rev 241179)
+++ 0001-filter-require-minimum-acceleration-factor-of-0.3.patch
2015-06-22 19:00:28 UTC (rev 241180)
@@ -1,52 +0,0 @@
-From f6313a9d010f03a66fd1f68e0bbd5e073101f342 Mon Sep 17 00:00:00 2001
-From: Peter Hutterer peter.hutte...@who-t.net
-Date: Thu, 4 Jun 2015 11:40:15 +1000
-Subject: [PATCH libinput] filter: require minimum acceleration factor of 0.3
-
-For really slow motions, the previous acceleration factor would go down to
-effectively zero. So the slower the mouse motion was, the more it would be
-slowed down which made the mouse at low speeds almost unusable.
-
-Cap the minimum acceleration at 0.3 which provides a predictable slow motion
-for the cursor when high precision is required.
-
-New/old acceleration functions comparison:
-
-  ^
-  |   /
-  |  /
-ty|_/
-  |   / /
-  |  / /
-  | / /
-  |/ /- new minimum accel factor
-  | /
-  |/___
-  tx
-
-i.e. the general shape is maintained, but it doesn't go to zero anymore. The
-functions aren't parallel, the new shape is slightly flatter than the previous
-one and they meet at the point where the functions flatten for the threshold
-(tx/ty). ascii art has its limits...
-
-Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

- src/filter.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/filter.c b/src/filter.c
-index c54d866..ed5a184 100644
 a/src/filter.c
-+++ b/src/filter.c
-@@ -354,7 +354,7 @@ pointer_accel_profile_linear(struct motion_filter *filter,
-   const double threshold = accel_filter-threshold; /* units/ms */
-   const double incline = accel_filter-incline;
- 
--  s1 = min(1, speed_in * 5);
-+  s1 = min(1, 0.3 + speed_in * 4);
-   s2 = 1 + (speed_in - threshold) * incline;
- 
-   return min(max_accel, s2  1 ? s2 : s1);
--- 
-2.4.1
-

Modified: PKGBUILD
===
--- PKGBUILD2015-06-22 14:08:11 UTC (rev 241179)
+++ PKGBUILD2015-06-22 19:00:28 UTC (rev 241180)
@@ -3,8 +3,8 @@
 # Maintainer: Jan de Groot
 
 pkgname=libinput
-pkgver=0.17.0
-pkgrel=2
+pkgver=0.18.0
+pkgrel=1
 pkgdesc=library that handles input devices for display servers and other 
applications that need to directly deal with input devices.
 arch=(i686 x86_64)
 url=http://www.freedesktop.org/wiki/Software/libinput/;
@@ -12,16 +12,13 @@
 depends=('mtdev' 'systemd' 'libevdev')
 install=libinput.install
 options=('!libtool')
-source=(http://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
-0001-filter-require-minimum-acceleration-factor-of-0.3.patch)
-sha256sums=('b7db243be3a745c1031b364f3595ce9bb31347f874b7299ef8d44c98d2fb28db'
-'SKIP'
-'8d0fbee0669cdf6ad1318dcdb859efb59f6fb94d92e244fd71dd57a00fbda82b')
+source=(http://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
+sha256sums=('64a70f96bab17a22eaf2fd7af17cf83def3388374096c7623be9448f62808cda'
+'SKIP')
 validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer 
(Who-T) off...@who-t.net
 
 prepare() {
   cd $pkgname-$pkgver
-  patch -Np1 -i ../0001-filter-require-minimum-acceleration-factor-of-0.3.patch
 }
 
 build() {


[arch-commits] Commit in libinput/trunk (2 files)

2015-06-09 Thread Laurent Carlier
Date: Tuesday, June 9, 2015 @ 13:56:10
  Author: lcarlier
Revision: 240445

upgpkg: libinput 0.17.0-2

improve handling of slow mouse movements

Added:
  libinput/trunk/0001-filter-require-minimum-acceleration-factor-of-0.3.patch
Modified:
  libinput/trunk/PKGBUILD

--+
 0001-filter-require-minimum-acceleration-factor-of-0.3.patch |   52 ++
 PKGBUILD |   13 +-
 2 files changed, 62 insertions(+), 3 deletions(-)

Added: 0001-filter-require-minimum-acceleration-factor-of-0.3.patch
===
--- 0001-filter-require-minimum-acceleration-factor-of-0.3.patch
(rev 0)
+++ 0001-filter-require-minimum-acceleration-factor-of-0.3.patch
2015-06-09 11:56:10 UTC (rev 240445)
@@ -0,0 +1,52 @@
+From f6313a9d010f03a66fd1f68e0bbd5e073101f342 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer peter.hutte...@who-t.net
+Date: Thu, 4 Jun 2015 11:40:15 +1000
+Subject: [PATCH libinput] filter: require minimum acceleration factor of 0.3
+
+For really slow motions, the previous acceleration factor would go down to
+effectively zero. So the slower the mouse motion was, the more it would be
+slowed down which made the mouse at low speeds almost unusable.
+
+Cap the minimum acceleration at 0.3 which provides a predictable slow motion
+for the cursor when high precision is required.
+
+New/old acceleration functions comparison:
+
+  ^
+  |   /
+  |  /
+ty|_/
+  |   / /
+  |  / /
+  | / /
+  |/ /- new minimum accel factor
+  | /
+  |/___
+  tx
+
+i.e. the general shape is maintained, but it doesn't go to zero anymore. The
+functions aren't parallel, the new shape is slightly flatter than the previous
+one and they meet at the point where the functions flatten for the threshold
+(tx/ty). ascii art has its limits...
+
+Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
+---
+ src/filter.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/filter.c b/src/filter.c
+index c54d866..ed5a184 100644
+--- a/src/filter.c
 b/src/filter.c
+@@ -354,7 +354,7 @@ pointer_accel_profile_linear(struct motion_filter *filter,
+   const double threshold = accel_filter-threshold; /* units/ms */
+   const double incline = accel_filter-incline;
+ 
+-  s1 = min(1, speed_in * 5);
++  s1 = min(1, 0.3 + speed_in * 4);
+   s2 = 1 + (speed_in - threshold) * incline;
+ 
+   return min(max_accel, s2  1 ? s2 : s1);
+-- 
+2.4.1
+

Modified: PKGBUILD
===
--- PKGBUILD2015-06-09 11:52:06 UTC (rev 240444)
+++ PKGBUILD2015-06-09 11:56:10 UTC (rev 240445)
@@ -4,7 +4,7 @@
 
 pkgname=libinput
 pkgver=0.17.0
-pkgrel=1
+pkgrel=2
 pkgdesc=library that handles input devices for display servers and other 
applications that need to directly deal with input devices.
 arch=(i686 x86_64)
 url=http://www.freedesktop.org/wiki/Software/libinput/;
@@ -12,11 +12,18 @@
 depends=('mtdev' 'systemd' 'libevdev')
 install=libinput.install
 options=('!libtool')
-source=(http://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
+source=(http://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
+0001-filter-require-minimum-acceleration-factor-of-0.3.patch)
 sha256sums=('b7db243be3a745c1031b364f3595ce9bb31347f874b7299ef8d44c98d2fb28db'
-'SKIP')
+'SKIP'
+'8d0fbee0669cdf6ad1318dcdb859efb59f6fb94d92e244fd71dd57a00fbda82b')
 validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer 
(Who-T) off...@who-t.net
 
+prepare() {
+  cd $pkgname-$pkgver
+  patch -Np1 -i ../0001-filter-require-minimum-acceleration-factor-of-0.3.patch
+}
+
 build() {
   cd $pkgname-$pkgver
   ./configure --prefix=/usr --disable-static