xserver-xorg-input-evtouch: Changes to 'debian-unstable'
debian/patches/04_server-1.7-ftbfs.diff | 75 ++++++++++-------------
debian/patches/05_fix_CURSORDIR.diff | 4 -
debian/patches/06_add_TSC-10_to_evdev_rules.diff | 4 -
3 files changed, 39 insertions(+), 44 deletions(-)
New commits:
commit 849ae808017835009d344516d40f4b3fcf2404aa
Author: Mattia Dongili <malattia@linux.it>
Date: Sat Feb 13 20:24:12 2010 +0900
Fix 04_server-1.7-ftbfs.diff
Assign proper button and axis labels, really count buttons.
As a side effect all other patches following this one have been
refreshed.
Signed-off-by: Mattia Dongili <malattia@linux.it>
diff --git a/debian/patches/04_server-1.7-ftbfs.diff b/debian/patches/04_server-1.7-ftbfs.diff
index ab46a04..a68c22c 100644
--- a/debian/patches/04_server-1.7-ftbfs.diff
+++ b/debian/patches/04_server-1.7-ftbfs.diff
@@ -10,8 +10,8 @@ Date: Sun Jan 24 15:45:51 2010 +0900
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
+--- xserver-xorg-input-evtouch.orig/evtouch.c 2010-02-13 20:16:09.802485295 +0900
++++ xserver-xorg-input-evtouch/evtouch.c 2010-02-13 20:16:10.330503893 +0900
@@ -57,6 +57,7 @@
#define NEED_EVENTS
#include <X11/X.h>
@@ -84,7 +84,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
} else {
if (ev->code == BTN_LEFT) {
SetBtnAction(priv, 1, ev->value);
-@@ -478,26 +476,99 @@
+@@ -478,26 +476,98 @@
return;
}
@@ -143,11 +143,10 @@ Index: xserver-xorg-input-evtouch/evtouch.c
+ /* 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 (i > num_buttons)
++ num_buttons = i;
+ }
+ }
+ if (num_buttons)
@@ -192,7 +191,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
local->fd = xf86OpenSerial(local->options);
DBGOUT(2, "EVTouch: %s\n", __FUNCTION__ );
-@@ -512,8 +583,7 @@
+@@ -512,8 +582,7 @@
DBG (9, XisbTrace (priv->buffer, 1));
@@ -202,7 +201,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
{
xf86CloseSerial(local->fd);
local->fd = -1;
-@@ -531,7 +601,6 @@
+@@ -531,7 +600,6 @@
if (ioctl(local->fd, EVIOCGRAB, (void *)1))
xf86Msg(X_ERROR, "%s: Unable to grab device (%s).\n", local->name, strerror(errno));
@@ -210,7 +209,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
#ifndef XFREE86_V4
xf86AddEnabledDevice(local);
#else
-@@ -544,8 +613,6 @@
+@@ -544,8 +612,6 @@
}
@@ -219,7 +218,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
static Bool
DeviceOff (DeviceIntPtr dev)
{
-@@ -555,7 +622,7 @@
+@@ -555,7 +621,7 @@
DBGOUT(2, "EVTouch: %s\n", __FUNCTION__ );
if (local->fd != -1)
@@ -228,39 +227,36 @@ Index: xserver-xorg-input-evtouch/evtouch.c
ioctl(local->fd, EVIOCGRAB, (void *)0);
xf86RemoveEnabledDevice (local);
if (priv->buffer)
-@@ -577,6 +644,75 @@
+@@ -577,6 +643,72 @@
}
-+static void EvtouchInitButtonLabels(int natoms, Atom *atoms)
++static Atom *EvtouchInitButtonLabels(void)
+{
+#ifdef HAVE_LABELS
-+ Atom atom;
-+ int button;
++ Atom *labels = xalloc(EV_MAX_BUTTONS * sizeof(Atom));
+
-+ /* First, make sure all atoms are initialized */
-+ atom = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
-+ for (button = 0; button < natoms; button++)
-+ atoms[button] = atom;
++ /* initialize the 5 button labels used by this driver */
++ labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
++ labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
++ labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
++ labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
++ labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
+
+#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 */
++ AXIS_LABEL_PROP_ABS_X,
++ AXIS_LABEL_PROP_ABS_Y,
++ AXIS_LABEL_PROP_ABS_Z,
++ AXIS_LABEL_PROP_ABS_WHEEL
+};
+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
++ AXIS_LABEL_PROP_REL_WHEEL
+};
+
+static void
@@ -304,7 +300,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
static Bool
-@@ -585,6 +721,7 @@
+@@ -585,6 +717,7 @@
DBGOUT(2, "EVTouch: %s\n", __FUNCTION__);
LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
EVTouchPrivatePtr priv = (EVTouchPrivatePtr) (local->private);
@@ -312,7 +308,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
unsigned char map[EV_MAX_BUTTONS];
int i;
-@@ -593,7 +730,7 @@
+@@ -593,7 +726,7 @@
priv->btn_count = EV_MAX_BUTTONS;
@@ -321,7 +317,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
* 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 @@
+@@ -603,9 +736,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) ||
@@ -333,7 +329,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
priv->virtual = 0;
priv->pViewPort_Y0 = &(pScrn->frameY0);
-@@ -620,24 +757,30 @@
+@@ -620,24 +753,29 @@
DBGOUT(2, "EVTouch: MaxValue H,V: %d %d\n", pScrn->maxHValue, pScrn->maxVValue);
priv->screen_width = screenInfo.screens[priv->screen_num]->width;
@@ -345,8 +341,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
* 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);
++ labels = EvtouchInitButtonLabels(labels);
+ if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ labels,
@@ -372,7 +367,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
priv->btn_count);
if (InitFocusClassDeviceStruct(dev) == FALSE) {
-@@ -645,13 +788,18 @@
+@@ -645,13 +783,18 @@
return !Success;
}
@@ -392,7 +387,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
#endif
local->history_size, Absolute) == FALSE)
{
-@@ -660,12 +808,20 @@
+@@ -660,12 +803,20 @@
}
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
@@ -415,7 +410,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
1024,
EV_AXIS_MIN_RES /* min_res */ ,
EV_AXIS_MAX_RES /* max_res */ );
-@@ -682,7 +838,6 @@
+@@ -682,7 +833,6 @@
priv->raw_y=priv->cur_y;
libtouchSetPos(priv->libtouch, priv->cur_x, priv->cur_y);
@@ -423,7 +418,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
if (InitProximityClassDeviceStruct (dev) == FALSE)
{
ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n");
-@@ -695,7 +850,7 @@
+@@ -695,7 +845,7 @@
return !Success;
}
@@ -432,7 +427,7 @@ Index: xserver-xorg-input-evtouch/evtouch.c
* Allocate the motion events buffer.
*/
xf86MotionHistoryAllocate (local);
-@@ -765,7 +920,7 @@
+@@ -765,7 +915,7 @@
if (sizeof(priv->ev) == count) {
count = 0;
EVTouchDumpPacketToLog(priv);
@@ -443,8 +438,8 @@ Index: xserver-xorg-input-evtouch/evtouch.c
}
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
+--- xserver-xorg-input-evtouch.orig/evtouch.h 2010-02-13 20:15:16.638486406 +0900
++++ xserver-xorg-input-evtouch/evtouch.h 2010-02-13 20:16:10.330503893 +0900
@@ -35,6 +35,22 @@
#define DBGOUT(lvl, ...)
#endif
diff --git a/debian/patches/05_fix_CURSORDIR.diff b/debian/patches/05_fix_CURSORDIR.diff
index a72df9a..b65a250 100644
--- a/debian/patches/05_fix_CURSORDIR.diff
+++ b/debian/patches/05_fix_CURSORDIR.diff
@@ -2,8 +2,8 @@ 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
+--- xserver-xorg-input-evtouch.orig/ev_calibrate.c 2010-02-13 20:16:09.314986596 +0900
++++ xserver-xorg-input-evtouch/ev_calibrate.c 2010-02-13 20:23:01.855013365 +0900
@@ -16,8 +16,8 @@
#include "ev_calibrate.h"
#include "config.h"
diff --git a/debian/patches/06_add_TSC-10_to_evdev_rules.diff b/debian/patches/06_add_TSC-10_to_evdev_rules.diff
index b7561cc..b0ede77 100644
--- a/debian/patches/06_add_TSC-10_to_evdev_rules.diff
+++ b/debian/patches/06_add_TSC-10_to_evdev_rules.diff
@@ -2,8 +2,8 @@ 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
+--- xserver-xorg-input-evtouch.orig/69-touchscreen.rules 2010-02-13 20:15:16.486486580 +0900
++++ xserver-xorg-input-evtouch/69-touchscreen.rules 2010-02-13 20:23:04.967002000 +0900
@@ -50,3 +50,5 @@
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{name}=="LBPS/2 Fujitsu Lifebook TouchScreen", SYMLINK+="input/evtouch_event"
# Elo Touchscreen
Reply to: