Allow for PAD devices without x/y (HUION tablets)

This commit is contained in:
Peter Hutterer 2015-03-20 08:59:40 +10:00
parent a9f5838e85
commit 7fdda1921c
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,51 @@
From 8501c0433587a64ff5ef2f2f42d7a2d54330c3a7 Mon Sep 17 00:00:00 2001
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Fri, 13 Mar 2015 11:24:27 -0400
Subject: [PATCH] Allow PAD only interfaces without EV_ABS and/or EV_X/Y to
report events
commit 0cfe113 (Allow PAD only interface without setting up EV_ABS
and/or EV_X/Y) allows xf86-input-wacom to handle Pad only interface but
such interface do not report any events.
We need to call usbWcmInitPadState() to be able to forward events.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
src/wcmUSB.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index b7c81c1..c15cd4a 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -553,7 +553,7 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
/* may be an expresskey only interface */
if (ISBITSET(common->wcmKeys, BTN_FORWARD) ||
ISBITSET(common->wcmKeys, BTN_0))
- return Success;
+ goto pad_init;
xf86Msg(X_ERROR, "%s: no abs bits.\n", pInfo->name);
return !Success;
@@ -572,7 +572,7 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
/* may be a PAD only interface */
if (ISBITSET(common->wcmKeys, BTN_FORWARD) ||
ISBITSET(common->wcmKeys, BTN_0))
- return Success;
+ goto pad_init;
xf86Msg(X_ERROR, "%s: unable to ioctl xmax value.\n", pInfo->name);
return !Success;
@@ -787,6 +787,7 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
common->wcmHWTouchSwitchState = 1;
}
+pad_init:
usbWcmInitPadState(pInfo);
return Success;
--
2.3.2

View File

@ -9,7 +9,7 @@
Summary: Xorg X11 wacom input driver
Name: xorg-x11-drv-wacom
Version: 0.29.0
Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
URL: http://www.x.org
License: GPLv2+
Group: User Interface/X Hardware Support
@ -22,6 +22,8 @@ Source2: commitid
Source0: http://prdownloads.sourceforge.net/linuxwacom/xf86-input-wacom-%{version}.tar.bz2
%endif
Patch01: 0001-Allow-PAD-only-interfaces-without-EV_ABS-and-or-EV_X.patch
ExcludeArch: s390 s390x
BuildRequires: xorg-x11-server-devel >= 1.10.99.902
@ -41,6 +43,7 @@ X.Org X11 wacom input driver for Wacom tablets.
%prep
%setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
%patch01 -p1
%build
autoreconf --force -v --install || exit 1
@ -100,6 +103,9 @@ X.Org X11 wacom input driver development files.
%{_bindir}/isdv4-serial-debugger
%changelog
* Fri Mar 20 2015 Peter Hutterer <peter.hutterer@redhat.com> 0.29.0-2
- Allow for PAD devices without x/y (HUION tablets)
* Tue Mar 17 2015 Peter Hutterer <peter.hutterer@redhat.com> 0.29.0-1
- wacom 0.29.0