From 5a0dca5b0e40352b4a16fa4e21d08bb8667f9a9e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mar 11 2010 04:51:26 +0000 Subject: - wacom-0.10.4-check-pktlen.patch: stop processing when the pktlen changes. Restores a bit removed from git that's still in linuxwacom. --- diff --git a/wacom-0.10.4-check-pktlen.patch b/wacom-0.10.4-check-pktlen.patch new file mode 100644 index 0000000..3656c7e --- /dev/null +++ b/wacom-0.10.4-check-pktlen.patch @@ -0,0 +1,46 @@ +From ece019225689982ce983c78a44c911eac4ca969c Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 9 Mar 2010 18:48:24 +1000 +Subject: [PATCH] Stop processing when the pktlen changes. + +--- + src/xf86Wacom.c | 23 +++++++++++++++++++++++ + 1 files changed, 23 insertions(+), 0 deletions(-) + +diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c +index 231325d..2242b13 100644 +--- a/src/xf86Wacom.c ++++ b/src/xf86Wacom.c +@@ -1193,6 +1193,29 @@ void wcmReadPacket(LocalDevicePtr local) + break; + } + pos += cnt; ++ ++ if (common->wcmDevCls != &gWacomUSBDevice) ++ { ++ data = common->buffer + pos; ++ if ( data[0] & 0x18 ) ++ { ++ if (common->wcmPktLength == 9) ++ { ++ DBG(1, common->debugLevel, ++ ErrorF("xf86WcmReadPacket: not a pen data any more\n")); ++ break; ++ } ++ } ++ else ++ { ++ if (common->wcmPktLength != 9) ++ { ++ DBG(1, common->debugLevel, ++ ErrorF("xf86WcmReadPacket: not a touch data any more\n")); ++ break; ++ } ++ } ++ } + } + + if (pos) +-- +1.6.6.1 + diff --git a/xorg-x11-drv-wacom.spec b/xorg-x11-drv-wacom.spec index 2bab5b7..d8ca47c 100644 --- a/xorg-x11-drv-wacom.spec +++ b/xorg-x11-drv-wacom.spec @@ -5,7 +5,7 @@ Summary: Xorg X11 wacom input driver Name: xorg-x11-drv-wacom Version: 0.10.4 -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.x.org License: GPLv2+ Group: User Interface/X Hardware Support @@ -26,12 +26,16 @@ Requires: libX11 libXi Provides: linuxwacom = %{version}-%{release} Obsoletes: linuxwacom <= 0.8.4.3 +Patch1: wacom-0.10.4-check-pktlen.patch + %description X.Org X11 wacom input driver for Wacom tablets. %prep %setup -q -n %{tarball}-%{version} +%patch1 -p1 + %build %configure --disable-static make %{_smp_mflags} @@ -81,6 +85,10 @@ X.Org X11 wacom input driver development files. %{_includedir}/xorg/wacom-properties.h %changelog +* Thu Mar 11 2010 Peter Hutterer 0.10.4-3 +- wacom-0.10.4-check-pktlen.patch: stop processing when the pktlen changes. + Restores a bit removed from git that's still in linuxwacom. + * Wed Feb 03 2010 Peter Hutterer 0.10.4-2 - Update sources to sourceforge, 0.10.4 was released on sf only.