[arch-commits] Commit in xf86-input-libinput/repos (10 files)

Andreas Radke andyrtr at archlinux.org
Mon Feb 16 18:53:52 UTC 2015


    Date: Monday, February 16, 2015 @ 19:53:52
  Author: andyrtr
Revision: 231617

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  xf86-input-libinput/repos/testing-i686/90-libinput.conf
    (from rev 231616, xf86-input-libinput/trunk/90-libinput.conf)
  xf86-input-libinput/repos/testing-i686/PKGBUILD
    (from rev 231616, xf86-input-libinput/trunk/PKGBUILD)
  xf86-input-libinput/repos/testing-i686/git_fixes.diff
    (from rev 231616, xf86-input-libinput/trunk/git_fixes.diff)
  xf86-input-libinput/repos/testing-x86_64/90-libinput.conf
    (from rev 231616, xf86-input-libinput/trunk/90-libinput.conf)
  xf86-input-libinput/repos/testing-x86_64/PKGBUILD
    (from rev 231616, xf86-input-libinput/trunk/PKGBUILD)
  xf86-input-libinput/repos/testing-x86_64/git_fixes.diff
    (from rev 231616, xf86-input-libinput/trunk/git_fixes.diff)
Deleted:
  xf86-input-libinput/repos/testing-i686/90-libinput.conf
  xf86-input-libinput/repos/testing-i686/PKGBUILD
  xf86-input-libinput/repos/testing-x86_64/90-libinput.conf
  xf86-input-libinput/repos/testing-x86_64/PKGBUILD

---------------------------------+
 /90-libinput.conf               |   60 +++++++++++++++++++++
 /PKGBUILD                       |   92 ++++++++++++++++++++++++++++++++
 testing-i686/90-libinput.conf   |   30 ----------
 testing-i686/PKGBUILD           |   39 -------------
 testing-i686/git_fixes.diff     |  108 ++++++++++++++++++++++++++++++++++++++
 testing-x86_64/90-libinput.conf |   30 ----------
 testing-x86_64/PKGBUILD         |   39 -------------
 testing-x86_64/git_fixes.diff   |  108 ++++++++++++++++++++++++++++++++++++++
 8 files changed, 368 insertions(+), 138 deletions(-)

Deleted: testing-i686/90-libinput.conf
===================================================================
--- testing-i686/90-libinput.conf	2015-02-16 18:53:36 UTC (rev 231616)
+++ testing-i686/90-libinput.conf	2015-02-16 18:53:52 UTC (rev 231617)
@@ -1,30 +0,0 @@
-# Match on all types of devices but tablet devices and joysticks
-
-Section "InputClass"
-        Identifier "libinput pointer catchall"
-        MatchIsPointer "on"
-        MatchDevicePath "/dev/input/event*"
-        Driver "libinput"
-EndSection
-
-Section "InputClass"
-        Identifier "libinput keyboard catchall"
-        MatchIsKeyboard "on"
-        MatchDevicePath "/dev/input/event*"
-        Driver "libinput"
-EndSection
-
-Section "InputClass"
-        Identifier "libinput touchpad catchall"
-        MatchIsTouchpad "on"
-        MatchDevicePath "/dev/input/event*"
-        Driver "libinput"
-EndSection
-
-Section "InputClass"
-        Identifier "libinput touchscreen catchall"
-        MatchIsTouchscreen "on"
-        MatchDevicePath "/dev/input/event*"
-        Driver "libinput"
-EndSection
-

Copied: xf86-input-libinput/repos/testing-i686/90-libinput.conf (from rev 231616, xf86-input-libinput/trunk/90-libinput.conf)
===================================================================
--- testing-i686/90-libinput.conf	                        (rev 0)
+++ testing-i686/90-libinput.conf	2015-02-16 18:53:52 UTC (rev 231617)
@@ -0,0 +1,30 @@
+# Match on all types of devices but tablet devices and joysticks
+
+Section "InputClass"
+        Identifier "libinput pointer catchall"
+        MatchIsPointer "on"
+        MatchDevicePath "/dev/input/event*"
+        Driver "libinput"
+EndSection
+
+Section "InputClass"
+        Identifier "libinput keyboard catchall"
+        MatchIsKeyboard "on"
+        MatchDevicePath "/dev/input/event*"
+        Driver "libinput"
+EndSection
+
+Section "InputClass"
+        Identifier "libinput touchpad catchall"
+        MatchIsTouchpad "on"
+        MatchDevicePath "/dev/input/event*"
+        Driver "libinput"
+EndSection
+
+Section "InputClass"
+        Identifier "libinput touchscreen catchall"
+        MatchIsTouchscreen "on"
+        MatchDevicePath "/dev/input/event*"
+        Driver "libinput"
+EndSection
+

Deleted: testing-i686/PKGBUILD
===================================================================
--- testing-i686/PKGBUILD	2015-02-16 18:53:36 UTC (rev 231616)
+++ testing-i686/PKGBUILD	2015-02-16 18:53:52 UTC (rev 231617)
@@ -1,39 +0,0 @@
-# $Id$
-# Maintainer: Laurent Carlier <lordheavym at gmail.com>
-
-pkgname=xf86-input-libinput
-pkgver=0.6.0
-pkgrel=1
-pkgdesc="Generic input driver for the X.Org server based on libinput"
-arch=('i686' 'x86_64')
-license=('custom')
-url="http://xorg.freedesktop.org/"
-depends=('libinput')
-makedepends=('xorg-server-devel' 'X-ABI-XINPUT_VERSION=21' 'libxi' 'libx11' 'resourceproto' 'scrnsaverproto')
-conflicts=('xorg-server<1.16' 'X-ABI-XINPUT_VERSION<21' 'X-ABI-XINPUT_VERSION>=22')
-groups=('xorg-drivers' 'xorg')
-source=(http://xorg.freedesktop.org/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2{,.sig}
-        90-libinput.conf)
-sha256sums=('2f29be1ed7f9b9c597b6f5c6ef24c37a244a0ba87ccd1c2586ffa4d08452ad79'
-            'SKIP'
-            'd4a728caadb7924852dcdc0da4de950c6fb9ebd8999d4e3af3d0baaa51cd0e75')
-validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) <office at who-t.net>
-
-build() {
-  cd ${pkgname}-${pkgver}
-
-  ./configure --prefix=/usr --disable-static
-  make
-}
-
-package() {
-  cd ${pkgname}-${pkgver}
-
-  make DESTDIR="${pkgdir}" install
-
-  install -m755 -d "${pkgdir}/usr/share/X11/xorg.conf.d"
-  install -m644 ../90-libinput.conf "${pkgdir}/usr/share/X11/xorg.conf.d/"
-  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
-}
-

Copied: xf86-input-libinput/repos/testing-i686/PKGBUILD (from rev 231616, xf86-input-libinput/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2015-02-16 18:53:52 UTC (rev 231617)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Laurent Carlier <lordheavym at gmail.com>
+
+pkgname=xf86-input-libinput
+pkgver=0.6.0
+pkgrel=2
+pkgdesc="Generic input driver for the X.Org server based on libinput"
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://xorg.freedesktop.org/"
+depends=('libinput')
+makedepends=('xorg-server-devel' 'X-ABI-XINPUT_VERSION=21' 'libxi' 'libx11' 'resourceproto' 'scrnsaverproto')
+conflicts=('xorg-server<1.16' 'X-ABI-XINPUT_VERSION<21' 'X-ABI-XINPUT_VERSION>=22')
+groups=('xorg-drivers' 'xorg')
+source=(http://xorg.freedesktop.org/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2{,.sig}
+        90-libinput.conf
+        git_fixes.diff)
+sha256sums=('2f29be1ed7f9b9c597b6f5c6ef24c37a244a0ba87ccd1c2586ffa4d08452ad79'
+            'SKIP'
+            'd4a728caadb7924852dcdc0da4de950c6fb9ebd8999d4e3af3d0baaa51cd0e75'
+            'a3777356128cc81535486508ebf7348f2486a543a291f7ed466f204c689b6ef2')
+validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) <office at who-t.net>
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  patch -Np1 -i ${srcdir}/git_fixes.diff # 2015-02-04 commit 875f1696b780862886c75cd88b29fbc933ea7a1b
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+
+  ./configure --prefix=/usr --disable-static
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+
+  make DESTDIR="${pkgdir}" install
+
+  install -m755 -d "${pkgdir}/usr/share/X11/xorg.conf.d"
+  install -m644 ../90-libinput.conf "${pkgdir}/usr/share/X11/xorg.conf.d/"
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
+

Copied: xf86-input-libinput/repos/testing-i686/git_fixes.diff (from rev 231616, xf86-input-libinput/trunk/git_fixes.diff)
===================================================================
--- testing-i686/git_fixes.diff	                        (rev 0)
+++ testing-i686/git_fixes.diff	2015-02-16 18:53:52 UTC (rev 231617)
@@ -0,0 +1,108 @@
+From dcdf1e24c8427ecac3bff315b85e8273b849a1da Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Wed, 28 Jan 2015 10:48:50 +1000
+Subject: Formatting fix
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+diff --git a/src/libinput.c b/src/libinput.c
+index 2563efe..85824ce 100644
+--- a/src/libinput.c
++++ b/src/libinput.c
+@@ -1115,9 +1115,10 @@ xf86libinput_parse_options(InputInfoPtr pInfo,
+ 
+ }
+ 
+-static int xf86libinput_pre_init(InputDriverPtr drv,
+-				 InputInfoPtr pInfo,
+-				 int flags)
++static int
++xf86libinput_pre_init(InputDriverPtr drv,
++		      InputInfoPtr pInfo,
++		      int flags)
+ {
+ 	struct xf86libinput *driver_data = NULL;
+         struct libinput *libinput = NULL;
+-- 
+cgit v0.10.2
+
+From 45e9b6c64b9bf0a84e3ee0e1fbb8f9f4efc3a8a0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Friedrich=20Sch=C3=B6ller?= <code at schoeller.se>
+Date: Sat, 24 Jan 2015 02:20:22 +0100
+Subject: Reapply configuration at DEVICE_ON
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The driver ignored my xorg configuration. Maybe I am doing something wrong,
+but I tried to track down the error and came up with this solution.
+
+The device is closed after DEVICE_INIT so we need to apply configuration
+options at DEVICE_ON.
+
+Signed-off-by: Friedrich Schöller <code at schoeller.se>
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+diff --git a/src/libinput.c b/src/libinput.c
+index 85824ce..a24cbff 100644
+--- a/src/libinput.c
++++ b/src/libinput.c
+@@ -326,6 +326,8 @@ xf86libinput_on(DeviceIntPtr dev)
+ 	driver_context.device_enabled_count++;
+ 	dev->public.on = TRUE;
+ 
++	LibinputApplyConfig(dev);
++
+ 	return Success;
+ }
+ 
+-- 
+cgit v0.10.2
+
+From 875f1696b780862886c75cd88b29fbc933ea7a1b Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Wed, 4 Feb 2015 14:08:46 +1000
+Subject: Only apply left-handed/scroll button configuration when it's
+ available
+
+https://bugs.freedesktop.org/show_bug.cgi?id=88961
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+diff --git a/src/libinput.c b/src/libinput.c
+index a24cbff..9613fbd 100644
+--- a/src/libinput.c
++++ b/src/libinput.c
+@@ -259,7 +259,8 @@ LibinputApplyConfig(DeviceIntPtr dev)
+ 			    driver_data->options.matrix[6], driver_data->options.matrix[7],
+ 			    driver_data->options.matrix[8]);
+ 
+-	if (libinput_device_config_left_handed_set(device,
++	if (libinput_device_config_left_handed_is_available(device) &&
++	    libinput_device_config_left_handed_set(device,
+ 						   driver_data->options.left_handed) != LIBINPUT_CONFIG_STATUS_SUCCESS)
+ 		xf86IDrvMsg(pInfo, X_ERROR,
+ 			    "Failed to set LeftHanded to %d\n",
+@@ -283,11 +284,13 @@ LibinputApplyConfig(DeviceIntPtr dev)
+ 			    method);
+ 	}
+ 
+-	scroll_button = btn_xorg2linux(driver_data->options.scroll_button);
+-	if (libinput_device_config_scroll_set_button(device, scroll_button) != LIBINPUT_CONFIG_STATUS_SUCCESS)
+-		xf86IDrvMsg(pInfo, X_ERROR,
+-			    "Failed to set ScrollButton to %d\n",
+-			    driver_data->options.scroll_button);
++	if (libinput_device_config_scroll_get_methods(device) & LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) {
++		scroll_button = btn_xorg2linux(driver_data->options.scroll_button);
++		if (libinput_device_config_scroll_set_button(device, scroll_button) != LIBINPUT_CONFIG_STATUS_SUCCESS)
++			xf86IDrvMsg(pInfo, X_ERROR,
++				    "Failed to set ScrollButton to %d\n",
++				    driver_data->options.scroll_button);
++	}
+ }
+ 
+ static int
+-- 
+cgit v0.10.2
+
+

Deleted: testing-x86_64/90-libinput.conf
===================================================================
--- testing-x86_64/90-libinput.conf	2015-02-16 18:53:36 UTC (rev 231616)
+++ testing-x86_64/90-libinput.conf	2015-02-16 18:53:52 UTC (rev 231617)
@@ -1,30 +0,0 @@
-# Match on all types of devices but tablet devices and joysticks
-
-Section "InputClass"
-        Identifier "libinput pointer catchall"
-        MatchIsPointer "on"
-        MatchDevicePath "/dev/input/event*"
-        Driver "libinput"
-EndSection
-
-Section "InputClass"
-        Identifier "libinput keyboard catchall"
-        MatchIsKeyboard "on"
-        MatchDevicePath "/dev/input/event*"
-        Driver "libinput"
-EndSection
-
-Section "InputClass"
-        Identifier "libinput touchpad catchall"
-        MatchIsTouchpad "on"
-        MatchDevicePath "/dev/input/event*"
-        Driver "libinput"
-EndSection
-
-Section "InputClass"
-        Identifier "libinput touchscreen catchall"
-        MatchIsTouchscreen "on"
-        MatchDevicePath "/dev/input/event*"
-        Driver "libinput"
-EndSection
-

Copied: xf86-input-libinput/repos/testing-x86_64/90-libinput.conf (from rev 231616, xf86-input-libinput/trunk/90-libinput.conf)
===================================================================
--- testing-x86_64/90-libinput.conf	                        (rev 0)
+++ testing-x86_64/90-libinput.conf	2015-02-16 18:53:52 UTC (rev 231617)
@@ -0,0 +1,30 @@
+# Match on all types of devices but tablet devices and joysticks
+
+Section "InputClass"
+        Identifier "libinput pointer catchall"
+        MatchIsPointer "on"
+        MatchDevicePath "/dev/input/event*"
+        Driver "libinput"
+EndSection
+
+Section "InputClass"
+        Identifier "libinput keyboard catchall"
+        MatchIsKeyboard "on"
+        MatchDevicePath "/dev/input/event*"
+        Driver "libinput"
+EndSection
+
+Section "InputClass"
+        Identifier "libinput touchpad catchall"
+        MatchIsTouchpad "on"
+        MatchDevicePath "/dev/input/event*"
+        Driver "libinput"
+EndSection
+
+Section "InputClass"
+        Identifier "libinput touchscreen catchall"
+        MatchIsTouchscreen "on"
+        MatchDevicePath "/dev/input/event*"
+        Driver "libinput"
+EndSection
+

Deleted: testing-x86_64/PKGBUILD
===================================================================
--- testing-x86_64/PKGBUILD	2015-02-16 18:53:36 UTC (rev 231616)
+++ testing-x86_64/PKGBUILD	2015-02-16 18:53:52 UTC (rev 231617)
@@ -1,39 +0,0 @@
-# $Id$
-# Maintainer: Laurent Carlier <lordheavym at gmail.com>
-
-pkgname=xf86-input-libinput
-pkgver=0.6.0
-pkgrel=1
-pkgdesc="Generic input driver for the X.Org server based on libinput"
-arch=('i686' 'x86_64')
-license=('custom')
-url="http://xorg.freedesktop.org/"
-depends=('libinput')
-makedepends=('xorg-server-devel' 'X-ABI-XINPUT_VERSION=21' 'libxi' 'libx11' 'resourceproto' 'scrnsaverproto')
-conflicts=('xorg-server<1.16' 'X-ABI-XINPUT_VERSION<21' 'X-ABI-XINPUT_VERSION>=22')
-groups=('xorg-drivers' 'xorg')
-source=(http://xorg.freedesktop.org/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2{,.sig}
-        90-libinput.conf)
-sha256sums=('2f29be1ed7f9b9c597b6f5c6ef24c37a244a0ba87ccd1c2586ffa4d08452ad79'
-            'SKIP'
-            'd4a728caadb7924852dcdc0da4de950c6fb9ebd8999d4e3af3d0baaa51cd0e75')
-validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) <office at who-t.net>
-
-build() {
-  cd ${pkgname}-${pkgver}
-
-  ./configure --prefix=/usr --disable-static
-  make
-}
-
-package() {
-  cd ${pkgname}-${pkgver}
-
-  make DESTDIR="${pkgdir}" install
-
-  install -m755 -d "${pkgdir}/usr/share/X11/xorg.conf.d"
-  install -m644 ../90-libinput.conf "${pkgdir}/usr/share/X11/xorg.conf.d/"
-  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
-}
-

Copied: xf86-input-libinput/repos/testing-x86_64/PKGBUILD (from rev 231616, xf86-input-libinput/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2015-02-16 18:53:52 UTC (rev 231617)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Laurent Carlier <lordheavym at gmail.com>
+
+pkgname=xf86-input-libinput
+pkgver=0.6.0
+pkgrel=2
+pkgdesc="Generic input driver for the X.Org server based on libinput"
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://xorg.freedesktop.org/"
+depends=('libinput')
+makedepends=('xorg-server-devel' 'X-ABI-XINPUT_VERSION=21' 'libxi' 'libx11' 'resourceproto' 'scrnsaverproto')
+conflicts=('xorg-server<1.16' 'X-ABI-XINPUT_VERSION<21' 'X-ABI-XINPUT_VERSION>=22')
+groups=('xorg-drivers' 'xorg')
+source=(http://xorg.freedesktop.org/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2{,.sig}
+        90-libinput.conf
+        git_fixes.diff)
+sha256sums=('2f29be1ed7f9b9c597b6f5c6ef24c37a244a0ba87ccd1c2586ffa4d08452ad79'
+            'SKIP'
+            'd4a728caadb7924852dcdc0da4de950c6fb9ebd8999d4e3af3d0baaa51cd0e75'
+            'a3777356128cc81535486508ebf7348f2486a543a291f7ed466f204c689b6ef2')
+validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) <office at who-t.net>
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  patch -Np1 -i ${srcdir}/git_fixes.diff # 2015-02-04 commit 875f1696b780862886c75cd88b29fbc933ea7a1b
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+
+  ./configure --prefix=/usr --disable-static
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+
+  make DESTDIR="${pkgdir}" install
+
+  install -m755 -d "${pkgdir}/usr/share/X11/xorg.conf.d"
+  install -m644 ../90-libinput.conf "${pkgdir}/usr/share/X11/xorg.conf.d/"
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
+

Copied: xf86-input-libinput/repos/testing-x86_64/git_fixes.diff (from rev 231616, xf86-input-libinput/trunk/git_fixes.diff)
===================================================================
--- testing-x86_64/git_fixes.diff	                        (rev 0)
+++ testing-x86_64/git_fixes.diff	2015-02-16 18:53:52 UTC (rev 231617)
@@ -0,0 +1,108 @@
+From dcdf1e24c8427ecac3bff315b85e8273b849a1da Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Wed, 28 Jan 2015 10:48:50 +1000
+Subject: Formatting fix
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+diff --git a/src/libinput.c b/src/libinput.c
+index 2563efe..85824ce 100644
+--- a/src/libinput.c
++++ b/src/libinput.c
+@@ -1115,9 +1115,10 @@ xf86libinput_parse_options(InputInfoPtr pInfo,
+ 
+ }
+ 
+-static int xf86libinput_pre_init(InputDriverPtr drv,
+-				 InputInfoPtr pInfo,
+-				 int flags)
++static int
++xf86libinput_pre_init(InputDriverPtr drv,
++		      InputInfoPtr pInfo,
++		      int flags)
+ {
+ 	struct xf86libinput *driver_data = NULL;
+         struct libinput *libinput = NULL;
+-- 
+cgit v0.10.2
+
+From 45e9b6c64b9bf0a84e3ee0e1fbb8f9f4efc3a8a0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Friedrich=20Sch=C3=B6ller?= <code at schoeller.se>
+Date: Sat, 24 Jan 2015 02:20:22 +0100
+Subject: Reapply configuration at DEVICE_ON
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The driver ignored my xorg configuration. Maybe I am doing something wrong,
+but I tried to track down the error and came up with this solution.
+
+The device is closed after DEVICE_INIT so we need to apply configuration
+options at DEVICE_ON.
+
+Signed-off-by: Friedrich Schöller <code at schoeller.se>
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+diff --git a/src/libinput.c b/src/libinput.c
+index 85824ce..a24cbff 100644
+--- a/src/libinput.c
++++ b/src/libinput.c
+@@ -326,6 +326,8 @@ xf86libinput_on(DeviceIntPtr dev)
+ 	driver_context.device_enabled_count++;
+ 	dev->public.on = TRUE;
+ 
++	LibinputApplyConfig(dev);
++
+ 	return Success;
+ }
+ 
+-- 
+cgit v0.10.2
+
+From 875f1696b780862886c75cd88b29fbc933ea7a1b Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Wed, 4 Feb 2015 14:08:46 +1000
+Subject: Only apply left-handed/scroll button configuration when it's
+ available
+
+https://bugs.freedesktop.org/show_bug.cgi?id=88961
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+diff --git a/src/libinput.c b/src/libinput.c
+index a24cbff..9613fbd 100644
+--- a/src/libinput.c
++++ b/src/libinput.c
+@@ -259,7 +259,8 @@ LibinputApplyConfig(DeviceIntPtr dev)
+ 			    driver_data->options.matrix[6], driver_data->options.matrix[7],
+ 			    driver_data->options.matrix[8]);
+ 
+-	if (libinput_device_config_left_handed_set(device,
++	if (libinput_device_config_left_handed_is_available(device) &&
++	    libinput_device_config_left_handed_set(device,
+ 						   driver_data->options.left_handed) != LIBINPUT_CONFIG_STATUS_SUCCESS)
+ 		xf86IDrvMsg(pInfo, X_ERROR,
+ 			    "Failed to set LeftHanded to %d\n",
+@@ -283,11 +284,13 @@ LibinputApplyConfig(DeviceIntPtr dev)
+ 			    method);
+ 	}
+ 
+-	scroll_button = btn_xorg2linux(driver_data->options.scroll_button);
+-	if (libinput_device_config_scroll_set_button(device, scroll_button) != LIBINPUT_CONFIG_STATUS_SUCCESS)
+-		xf86IDrvMsg(pInfo, X_ERROR,
+-			    "Failed to set ScrollButton to %d\n",
+-			    driver_data->options.scroll_button);
++	if (libinput_device_config_scroll_get_methods(device) & LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) {
++		scroll_button = btn_xorg2linux(driver_data->options.scroll_button);
++		if (libinput_device_config_scroll_set_button(device, scroll_button) != LIBINPUT_CONFIG_STATUS_SUCCESS)
++			xf86IDrvMsg(pInfo, X_ERROR,
++				    "Failed to set ScrollButton to %d\n",
++				    driver_data->options.scroll_button);
++	}
+ }
+ 
+ static int
+-- 
+cgit v0.10.2
+
+



More information about the arch-commits mailing list