xserver-xorg-input-evtouch: Changes to 'debian-unstable'
debian/changelog | 11
debian/control | 4
debian/patches/04_server-1.7-ftbfs.diff | 520 +++++++++++++++++++++++
debian/patches/05_fix_CURSORDIR.diff | 35 +
debian/patches/06_add_TSC-10_to_evdev_rules.diff | 12
debian/patches/series | 3
debian/rules | 2
debian/source/format | 1
8 files changed, 585 insertions(+), 3 deletions(-)
New commits:
commit bd34f8ca35b7ce4c2c5abb1317c99d2d85aa7199
Author: Mattia Dongili <malattia@linux.it>
Date: Mon Jan 25 00:59:43 2010 +0900
Add TSC-10 to udev rules
Signed-off-by: Mattia Dongili <malattia@linux.it>
diff --git a/debian/changelog b/debian/changelog
index dc0c983..184ff43 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ xf86-input-evtouch (0.8.8-2) unstable; urgency=low
* Switch to dpkg-source 3.0 (quilt) format
* add 05_fix_CURSORDIR.diff to let ev_calibrate find empty_cursor.xpm
(Closes: #482195)
+ * add TSC-10 to udev's rules (Closes: #487793)
-- Mattia Dongili <malattia@debian.org> Mon, 25 Jan 2010 00:29:03 +0900
diff --git a/debian/patches/06_add_TSC-10_to_evdev_rules.diff b/debian/patches/06_add_TSC-10_to_evdev_rules.diff
new file mode 100644
index 0000000..b7561cc
--- /dev/null
+++ b/debian/patches/06_add_TSC-10_to_evdev_rules.diff
@@ -0,0 +1,12 @@
+Add TSC-10 to udev's rules
+
+Index: xserver-xorg-input-evtouch/69-touchscreen.rules
+===================================================================
+--- xserver-xorg-input-evtouch.orig/69-touchscreen.rules 2010-01-25 00:57:11.691970131 +0900
++++ xserver-xorg-input-evtouch/69-touchscreen.rules 2010-01-25 00:57:49.287972512 +0900
+@@ -50,3 +50,5 @@
+ KERNEL=="event*", SUBSYSTEM=="input", ATTRS{name}=="LBPS/2 Fujitsu Lifebook TouchScreen", SYMLINK+="input/evtouch_event"
+ # Elo Touchscreen
+ KERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="04e7", ATTRS{idProduct}=="0020", SYMLINK+="input/evtouch_event"
++# TSC-10
++KERNEL=="event*", SUBSYSTEM=="input", ATTRS{name}=="TSC-10 DM TSC-10 DM", SYMLINK+="input/evtouch_event"
diff --git a/debian/patches/series b/debian/patches/series
index 2538745..45d6360 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
03_server-1.6-ftbfs.diff
04_server-1.7-ftbfs.diff
05_fix_CURSORDIR.diff
+06_add_TSC-10_to_evdev_rules.diff
commit d982790bbc5fffbde1e691de4161409217aee7ac
Author: Mattia Dongili <malattia@linux.it>
Date: Mon Jan 25 00:39:55 2010 +0900
Fix CURSORDIR
for some reason the build rules define CURSORDIR but the code uses
CURSORDIRECTORY. Just make the code consistent.
Signed-off-by: Mattia Dongili <malattia@linux.it>
diff --git a/debian/changelog b/debian/changelog
index b8d1476..dc0c983 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ xf86-input-evtouch (0.8.8-2) unstable; urgency=low
[ Mattia Dongili ]
* Fix building and rebuild with xorg 1.7
* Switch to dpkg-source 3.0 (quilt) format
+ * add 05_fix_CURSORDIR.diff to let ev_calibrate find empty_cursor.xpm
+ (Closes: #482195)
-- Mattia Dongili <malattia@debian.org> Mon, 25 Jan 2010 00:29:03 +0900
diff --git a/debian/patches/05_fix_CURSORDIR.diff b/debian/patches/05_fix_CURSORDIR.diff
new file mode 100644
index 0000000..a72df9a
--- /dev/null
+++ b/debian/patches/05_fix_CURSORDIR.diff
@@ -0,0 +1,35 @@
+The code uses CURSORDIRECTORY but the build rules define CURSORDIR.
+
+Index: xserver-xorg-input-evtouch/ev_calibrate.c
+===================================================================
+--- xserver-xorg-input-evtouch.orig/ev_calibrate.c 2010-01-25 00:43:21.327944157 +0900
++++ xserver-xorg-input-evtouch/ev_calibrate.c 2010-01-25 00:44:05.639972621 +0900
+@@ -16,8 +16,8 @@
+ #include "ev_calibrate.h"
+ #include "config.h"
+
+-#ifndef CURSORDIRECTORY
+-#define CURSORDIRECTORY ""
++#ifndef CURSORDIR
++#define CURSORDIR ""
+ #endif
+
+ pthread_mutex_t got_min_max_mtx;
+@@ -287,7 +287,7 @@
+ }
+
+ rc = XReadBitmapFile(display, win,
+- CURSORDIRECTORY"/empty_cursor.xbm",
++ CURSORDIR"/empty_cursor.xbm",
+ &cursor_width, &cursor_height,
+ &cursor_pic,
+ &hotspot_x, &hotspot_y);
+@@ -295,7 +295,7 @@
+ /* check for failure or success. */
+ switch (rc) {
+ case BitmapOpenFailed:
+- fprintf(stderr, "XReadBitmapFile - could not open file '%s/empty_cursor.xbm'.\n", CURSORDIRECTORY);
++ fprintf(stderr, "XReadBitmapFile - could not open file '%s/empty_cursor.xbm'.\n", CURSORDIR);
+ break;
+ case BitmapFileInvalid:
+ fprintf(stderr,
diff --git a/debian/patches/series b/debian/patches/series
index 33259ec..2538745 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
02_calibration_1.6.patch
03_server-1.6-ftbfs.diff
04_server-1.7-ftbfs.diff
+05_fix_CURSORDIR.diff
diff --git a/debian/rules b/debian/rules
index 453f647..49301cf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,7 +19,7 @@ configure: configure-stamp
configure-stamp: $(STAMP_DIR)/patch
dh_testdir
# Add here commands to configure the package.
- ./configure --prefix=/usr --enable-evcalibrate
+ ./configure --prefix=/usr --enable-evcalibrate CURSORDIRECTORY=/usr/share/xf86-input-evtouch
touch configure-stamp
build: build-stamp
commit d618279518a9b55841dfdfeb89b55a481ecb041e
Author: Mattia Dongili <malattia@linux.it>
Date: Mon Jan 25 00:30:42 2010 +0900
Switch to 3.0 source format
Signed-off-by: Mattia Dongili <malattia@linux.it>
diff --git a/debian/changelog b/debian/changelog
index 7cf837b..b8d1476 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,9 @@ xf86-input-evtouch (0.8.8-2) unstable; urgency=low
[ Mattia Dongili ]
* Fix building and rebuild with xorg 1.7
+ * Switch to dpkg-source 3.0 (quilt) format
- -- Mattia Dongili <malattia@debian.org> Sun, 24 Jan 2010 15:49:45 +0900
+ -- Mattia Dongili <malattia@debian.org> Mon, 25 Jan 2010 00:29:03 +0900
xf86-input-evtouch (0.8.8-1) unstable; urgency=low
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
commit 16187b36244301a62a6794151b3f5def2715f855
Author: Mattia Dongili <malattia@linux.it>
Date: Mon Jan 25 00:21:37 2010 +0900
Make lintian happier (D-Standards updated)
Signed-off-by: Mattia Dongili <malattia@linux.it>
diff --git a/debian/control b/debian/control
index c5f9d6a..13f353c 100644
--- a/debian/control
+++ b/debian/control
@@ -4,14 +4,14 @@ Priority: optional
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Uploaders: Mattia Dongili <malattia@debian.org>
Build-Depends: debhelper (>= 5), pkg-config, xserver-xorg-dev (>= 2:1.4), x11proto-randr-dev, libxrender-dev, libx11-dev, quilt
-Standards-Version: 3.8.1
+Standards-Version: 3.8.3
Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-input-evtouch
Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-input-evtouch.git
Homepage: http://www.conan.de/touchscreen/evtouch.html
Package: xserver-xorg-input-evtouch
Architecture: any
-Depends: ${shlibs:Depends}, ${xserver:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${xserver:Depends}
Provides: ${xinpdriver:Provides}
Description: Touchscreen-Driver for X.Org/XFree86 server
This XFree/X.Org driver provides support for touchscreens input devices.
commit 1bff1a918be4cda5fde41511e1519dd9f94e2eb5
Author: Mattia Dongili <malattia@linux.it>
Date: Sun Jan 24 15:50:02 2010 +0900
Fix and rebuild with xorg 1.7
Signed-off-by: Mattia Dongili <malattia@linux.it>
diff --git a/debian/changelog b/debian/changelog
index 850e501..7cf837b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xf86-input-evtouch (0.8.8-2) unstable; urgency=low
+
+ [ Mattia Dongili ]
+ * Fix building and rebuild with xorg 1.7
+
+ -- Mattia Dongili <malattia@debian.org> Sun, 24 Jan 2010 15:49:45 +0900
+
xf86-input-evtouch (0.8.8-1) unstable; urgency=low
[ Mattia Dongili ]
diff --git a/debian/patches/04_server-1.7-ftbfs.diff b/debian/patches/04_server-1.7-ftbfs.diff
new file mode 100644
index 0000000..ab46a04
--- /dev/null
+++ b/debian/patches/04_server-1.7-ftbfs.diff
@@ -0,0 +1,520 @@
+commit f88ce643a4d343cc27ef6ef7e0bf148f885043ab
+Author: Mattia Dongili <malattia@linux.it>
+Date: Sun Jan 24 15:45:51 2010 +0900
+
+ 04
+
+ Build with 1.7. Also add some more probing taken from evdev.
+
+ Signed-off-by: Mattia Dongili <malattia@linux.it>
+
+Index: xserver-xorg-input-evtouch/evtouch.c
+===================================================================
+--- xserver-xorg-input-evtouch.orig/evtouch.c 2010-01-25 00:07:31.356444503 +0900
++++ xserver-xorg-input-evtouch/evtouch.c 2010-01-25 00:10:29.235974617 +0900
+@@ -57,6 +57,7 @@
+ #define NEED_EVENTS
+ #include <X11/X.h>
+ #include <X11/Xproto.h>
++#include <xserver-properties.h>
+
+ #include "xf86.h"
+
+@@ -129,7 +130,6 @@
+ 0
+ };
+
+-#ifdef XFree86LOADER
+ static XF86ModuleVersionInfo VersionRec =
+ {
+ "evtouch",
+@@ -164,9 +164,7 @@
+ }
+
+
+-XF86ModuleData evtouchModuleData = {&VersionRec, Plug, Unplug };
+-
+-#endif /* XFree86LOADER */
++_X_EXPORT XF86ModuleData evtouchModuleData = {&VersionRec, Plug, Unplug };
+
+
+ static const char *default_options[] =
+@@ -239,7 +237,7 @@
+
+ priv->emulate3_timer_expired = TRUE;
+ xf86UnblockSIGIO(sigstate);
+-
++
+ return 0;
+ }
+
+@@ -339,7 +337,7 @@
+ priv->cur_x,
+ priv->cur_y);
+ }
+- }
++ }
+ }
+ }
+
+@@ -372,7 +370,7 @@
+ 0, 0, 0, 0,
+ &priv->cur_x, &priv->cur_y);
+ #endif
+-
++
+ libtouchSetPos(priv->libtouch, priv->cur_x, priv->cur_y);
+ }
+
+@@ -394,7 +392,7 @@
+ priv->emulate3_timeout,
+ emulate3Timer,
+ local);
+-
++
+ if ( (ev->value == 1) && (ev->code == BTN_LEFT) ) {
+ priv->touch_flags |= LB_STAT;
+ }
+@@ -419,7 +417,7 @@
+ DBGOUT(2, "EVTouch: Right Release\n");
+ priv->touch_flags &= ~RB_STAT;
+ SetBtnAction(priv, 3, BTN_RELEASE);
+- }
++ }
+ } else {
+ if (ev->code == BTN_LEFT) {
+ SetBtnAction(priv, 1, ev->value);
+@@ -478,26 +476,99 @@
+ return;
+ }
+
+-
+-
++#define TestBit(bit, array) ((array[(bit) / LONG_BITS]) & (1L << ((bit) % LONG_BITS)))
++#define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
+
+ static Bool
+ QueryHardware (LocalDevicePtr local)
+ {
+- DBGOUT(2, "EVTouch: %s\n", __FUNCTION__);
+-
+- return Success;
++ EVTouchPrivatePtr priv = (EVTouchPrivatePtr) (local->private);
++ size_t len;
++ int i, num_buttons;
++
++ DBGOUT(2, "EVTouch: %s\n", __FUNCTION__);
++
++ if (ioctl(local->fd, EVIOCGNAME(sizeof(priv->name) - 1), priv->name) < 0) {
++ xf86Msg(X_ERROR, "ioctl EVIOCGNAME failed: %s\n", strerror(errno));
++ goto error;
++ }
++
++ len = ioctl(local->fd, EVIOCGBIT(0, sizeof(priv->bitmask)), priv->bitmask);
++ if (len < 0) {
++ xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
++ local->name, strerror(errno));
++ goto error;
++ }
++
++ len = ioctl(local->fd, EVIOCGBIT(EV_REL, sizeof(priv->rel_bitmask)), priv->rel_bitmask);
++ if (len < 0) {
++ xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
++ local->name, strerror(errno));
++ goto error;
++ }
++
++ len = ioctl(local->fd, EVIOCGBIT(EV_ABS, sizeof(priv->abs_bitmask)), priv->abs_bitmask);
++ if (len < 0) {
++ xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
++ local->name, strerror(errno));
++ goto error;
++ }
++
++ len = ioctl(local->fd, EVIOCGBIT(EV_KEY, sizeof(priv->key_bitmask)), priv->key_bitmask);
++ if (len < 0) {
++ xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
++ local->name, strerror(errno));
++ goto error;
++ }
++
++ num_buttons = 0;
++
++ /* count all buttons */
++ for (i = BTN_MISC; i < BTN_JOYSTICK; i++)
++ {
++ int mapping = 0;
++ if (TestBit(i, priv->key_bitmask))
++ {
++ if (mapping > num_buttons)
++ num_buttons = mapping;
++ }
++ }
++ if (num_buttons)
++ {
++ priv->flags |= EVTOUCH_BUTTON_EVENTS;
++ priv->num_buttons = num_buttons;
++ xf86Msg(X_INFO, "%s: Found %d mouse buttons\n", local->name,
++ num_buttons);
++ }
++
++ for (i = 0; i < REL_MAX; i++) {
++ if (TestBit(i, priv->rel_bitmask)) {
++ xf86Msg(X_INFO, "%s: Found relative axes\n", local->name);
++ priv->flags |= EVTOUCH_RELATIVE_EVENTS;
++ break;
++ }
++ }
++
++ for (i = 0; i < ABS_MAX; i++) {
++ if (TestBit(i, priv->abs_bitmask)) {
++ xf86Msg(X_INFO, "%s: Found absolute axes\n", local->name);
++ priv->flags |= EVTOUCH_ABSOLUTE_EVENTS;
++ break;
++ }
++ }
++
++ return Success;
++error:
++ return (!Success);
+ }
+
+
+-
+-
+ static Bool
+ DeviceOn (DeviceIntPtr dev)
+ {
+ LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
+ EVTouchPrivatePtr priv = (EVTouchPrivatePtr) (local->private);
+-
++
+ local->fd = xf86OpenSerial(local->options);
+
+ DBGOUT(2, "EVTouch: %s\n", __FUNCTION__ );
+@@ -512,8 +583,7 @@
+
+ DBG (9, XisbTrace (priv->buffer, 1));
+
+-
+- if (!priv->buffer)
++ if (!priv->buffer)
+ {
+ xf86CloseSerial(local->fd);
+ local->fd = -1;
+@@ -531,7 +601,6 @@
+ if (ioctl(local->fd, EVIOCGRAB, (void *)1))
+ xf86Msg(X_ERROR, "%s: Unable to grab device (%s).\n", local->name, strerror(errno));
+
+-
+ #ifndef XFREE86_V4
+ xf86AddEnabledDevice(local);
+ #else
+@@ -544,8 +613,6 @@
+ }
+
+
+-
+-
+ static Bool
+ DeviceOff (DeviceIntPtr dev)
+ {
+@@ -555,7 +622,7 @@
+ DBGOUT(2, "EVTouch: %s\n", __FUNCTION__ );
+
+ if (local->fd != -1)
+- {
++ {
+ ioctl(local->fd, EVIOCGRAB, (void *)0);
+ xf86RemoveEnabledDevice (local);
+ if (priv->buffer)
+@@ -577,6 +644,75 @@
+ }
+
+
++static void EvtouchInitButtonLabels(int natoms, Atom *atoms)
++{
++#ifdef HAVE_LABELS
++ Atom atom;
++ int button;
++
++ /* First, make sure all atoms are initialized */
++ atom = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
++ for (button = 0; button < natoms; button++)
++ atoms[button] = atom;
++
++#endif
++}
++
++static char* abs_labels[] = {
++ AXIS_LABEL_PROP_ABS_X, /* 0x00 */
++ AXIS_LABEL_PROP_ABS_Y, /* 0x01 */
++ AXIS_LABEL_PROP_ABS_Z, /* 0x02 */
++ AXIS_LABEL_PROP_ABS_RX, /* 0x03 */
++ AXIS_LABEL_PROP_ABS_RY, /* 0x04 */
++ AXIS_LABEL_PROP_ABS_RZ /* 0x05 */
++};
++static char* rel_labels[] = {
++ AXIS_LABEL_PROP_REL_X,
++ AXIS_LABEL_PROP_REL_Y,
++ AXIS_LABEL_PROP_REL_Z,
++ AXIS_LABEL_PROP_REL_RX,
++ AXIS_LABEL_PROP_REL_RY,
++ AXIS_LABEL_PROP_REL_RZ
++};
++
++static void
++EvtouchInitAxesLabels(EVTouchPrivatePtr pEVTouch, int natoms, Atom *atoms)
++{
++#ifdef HAVE_LABELS
++ Atom atom;
++ int axis;
++ char **labels;
++ int labels_len = 0;
++ char *misc_label;
++
++ if (pEVTouch->flags & EVTOUCH_ABSOLUTE_EVENTS)
++ {
++ labels = abs_labels;
++ labels_len = ArrayLength(abs_labels);
++ misc_label = AXIS_LABEL_PROP_ABS_MISC;
++ } else if ((pEVTouch->flags & EVTOUCH_RELATIVE_EVENTS))
++ {
++ labels = rel_labels;
++ labels_len = ArrayLength(rel_labels);
++ misc_label = AXIS_LABEL_PROP_REL_MISC;
++ }
++
++ memset(atoms, 0, natoms * sizeof(Atom));
++
++ /* Now fill the ones we know */
++ for (axis = 0; axis < labels_len; axis++)
++ {
++ if (pEVTouch->axis_map[axis] == -1)
++ continue;
++
++ atom = XIGetKnownProperty(labels[axis]);
++ if (!atom) /* Should not happen */
++ continue;
++
++ atoms[pEVTouch->axis_map[axis]] = atom;
++ }
++#endif
++}
+
+
+ static Bool
+@@ -585,6 +721,7 @@
+ DBGOUT(2, "EVTouch: %s\n", __FUNCTION__);
+ LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
+ EVTouchPrivatePtr priv = (EVTouchPrivatePtr) (local->private);
++ Atom *labels, *atoms;
+ unsigned char map[EV_MAX_BUTTONS];
+ int i;
+
+@@ -593,7 +730,7 @@
+
+ priv->btn_count = EV_MAX_BUTTONS;
+
+- /*
++ /*
+ * these have to be here instead of in the SetupProc, because when the
+ * SetupProc is run at server startup, screenInfo is not setup yet
+ */
+@@ -603,9 +740,9 @@
+ priv->screen_height = pScrn->virtualY;
+ priv->pViewPort_X0 = &(pScrn->frameX0); /* initialize the pointers to the viewport coords */
+ if ( (priv->screen_width != priv->phys_width) ||
+- (priv->screen_height != priv->phys_height) )
++ (priv->screen_height != priv->phys_height) )
+ priv->virtual = 1;
+- else
++ else
+ priv->virtual = 0;
+
+ priv->pViewPort_Y0 = &(pScrn->frameY0);
+@@ -620,24 +757,30 @@
+ DBGOUT(2, "EVTouch: MaxValue H,V: %d %d\n", pScrn->maxHValue, pScrn->maxVValue);
+
+ priv->screen_width = screenInfo.screens[priv->screen_num]->width;
+- priv->screen_height = screenInfo.screens[priv->screen_num]->height;
++ priv->screen_height = screenInfo.screens[priv->screen_num]->height;
+
+- /*
++ /*
+ * Device reports button press for 5 buttons.
+ */
+- if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS, map) == FALSE)
++ labels = xalloc(EV_MAX_BUTTONS * sizeof(Atom));
++ EvtouchInitButtonLabels(EV_MAX_BUTTONS, labels);
++ if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS,
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
++ labels,
++#endif
++ map) == FALSE)
+ {
+ ErrorF("Unable to allocate EVTouch touchscreen ButtonClassDeviceStruct\n");
+ return BadAlloc;
+- }
++ }
+
+- DBGOUT(2, "EVTouch: %s btn_count=%d\n", __FUNCTION__,
++ DBGOUT(2, "EVTouch: %s btn_count=%d\n", __FUNCTION__,
+ priv->btn_count);
+ priv->btn_actions = xcalloc(priv->btn_count, sizeof(BtnAction));
+- memset(priv->btn_actions, 0,
++ memset(priv->btn_actions, 0,
+ priv->btn_count * sizeof(BtnAction));
+-
+- DBGOUT(2, "EVTouch: %s btn_count=%d\n", __FUNCTION__,
++
++ DBGOUT(2, "EVTouch: %s btn_count=%d\n", __FUNCTION__,
+ priv->btn_count);
+
+ if (InitFocusClassDeviceStruct(dev) == FALSE) {
+@@ -645,13 +788,18 @@
+ return !Success;
+ }
+
+- /*
++ /*
+ * Device reports motions on 2 axes in absolute coordinates.
+ * Axes min and max values are reported in raw coordinates.
+ */
++ atoms = xalloc(2 * sizeof(Atom));
++ EvtouchInitAxesLabels(priv, 2, atoms);
++
+ if (InitValuatorClassDeviceStruct(dev, 2,
+ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
+ xf86GetMotionEvents,
++#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
++ atoms,
+ #endif
+ local->history_size, Absolute) == FALSE)
+ {
+@@ -660,12 +808,20 @@
+ }
+
+ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
+- xf86InitValuatorAxisStruct(dev, 0, 0, priv->screen_width,
++ xf86InitValuatorAxisStruct(dev, 0,
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
++ atoms[0],
++#endif
++ 0, priv->screen_width,
+ 1024,
+ EV_AXIS_MIN_RES /* min_res */ ,
+ EV_AXIS_MAX_RES /* max_res */ );
+ xf86InitValuatorDefaults(dev, 0);
+- xf86InitValuatorAxisStruct(dev, 1, 0, priv->screen_height,
++ xf86InitValuatorAxisStruct(dev, 1,
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
++ atoms[1],
++#endif
++ 0, priv->screen_height,
+ 1024,
+ EV_AXIS_MIN_RES /* min_res */ ,
+ EV_AXIS_MAX_RES /* max_res */ );
+@@ -682,7 +838,6 @@
+ priv->raw_y=priv->cur_y;
+ libtouchSetPos(priv->libtouch, priv->cur_x, priv->cur_y);
+
+-
+ if (InitProximityClassDeviceStruct (dev) == FALSE)
+ {
+ ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n");
+@@ -695,7 +850,7 @@
+ return !Success;
+ }
+
+- /*
++ /*
+ * Allocate the motion events buffer.
+ */
+ xf86MotionHistoryAllocate (local);
+@@ -765,7 +920,7 @@
+ if (sizeof(priv->ev) == count) {
+ count = 0;
+ EVTouchDumpPacketToLog(priv);
+-
++
+ return Success;
+ }
+ }
+Index: xserver-xorg-input-evtouch/evtouch.h
+===================================================================
+--- xserver-xorg-input-evtouch.orig/evtouch.h 2010-01-25 00:06:07.160442605 +0900
++++ xserver-xorg-input-evtouch/evtouch.h 2010-01-25 00:11:08.267943739 +0900
+@@ -35,6 +35,22 @@
+ #define DBGOUT(lvl, ...)
+ #endif
+
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
++#define HAVE_PROPERTIES 1
++
++/* 1.6 has properties, but no labels */
++#ifdef AXIS_LABEL_PROP
++#define HAVE_LABELS
++#else
++#undef HAVE_LABELS
++#endif
++
++#endif
++
++#define LONG_BITS (sizeof(long) * 8)
++/* Number of longs needed to hold the given number of bits */
++#define NLONGS(x) (((x) + LONG_BITS - 1) / LONG_BITS)
++
+ /******************************************************************************
+ * Definitions
+ * structs, typedefs, #defines, enums
+@@ -52,6 +68,10 @@
+
+ #define EV_MAX_BUTTONS 5
+
++#define EVTOUCH_BUTTON_EVENTS 0x01
++#define EVTOUCH_RELATIVE_EVENTS 0x02
++#define EVTOUCH_ABSOLUTE_EVENTS 0x04
++
+ #define TOUCHED 0x01
+ #define X_COORD 0x02
+ #define Y_COORD 0x04
+@@ -80,6 +100,8 @@
+ int min_rel_y; /* Minimum y reported by calibration */
+ int max_rel_y; /* Maximum y */
+
++ int axis_map[max(ABS_CNT, REL_CNT)]; /* Map evtouch <axis> to index */
++
+ int drag_timer;
+ Bool emulate3;
+ int emulate3_timeout;
+@@ -129,10 +151,10 @@
+ int screen_num; /* Screen associated with the device */
+ int screen_width; /* Width of the associated X screen */
+ int screen_height; /* Height of the screen */
+-
++
+ XISBuffer *buffer;
+ struct input_event ev; /* packet being/just read */
+-
++
+ int packeti; /* index into packet */
+ Bool cs7flag;
+ Bool binary_pkt; /* indicates packet was a binary touch */
+@@ -141,6 +163,16 @@
+
+ LibTouchRecPtr libtouch;
+ LocalDevicePtr local;
++
++ /* Cached info from device. */
++ int flags;
++ int num_buttons;
++ char name[1024];
++ unsigned long bitmask[NLONGS(EV_CNT)];
++ unsigned long key_bitmask[NLONGS(KEY_CNT)];
++ unsigned long rel_bitmask[NLONGS(REL_CNT)];
++ unsigned long abs_bitmask[NLONGS(ABS_CNT)];
++
+ } EVTouchPrivateRec, *EVTouchPrivatePtr;
+
+
diff --git a/debian/patches/series b/debian/patches/series
index dca9e11..33259ec 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
01_fix_warnings.patch
02_calibration_1.6.patch
03_server-1.6-ftbfs.diff
+04_server-1.7-ftbfs.diff
Reply to: