Hello community,
here is the log from the commit of package x11-input-evtouch for openSUSE:Factory
checked in at Tue Mar 9 15:47:15 CET 2010.
--------
--- x11-input-evtouch/x11-input-evtouch.changes 2009-12-16 17:26:38.000000000 +0100
+++ /mounts/work_src_done/STABLE/x11-input-evtouch/x11-input-evtouch.changes 2010-03-09 12:06:08.000000000 +0100
@@ -1,0 +2,6 @@
+Tue Mar 9 12:05:11 CET 2010 - ro@suse.de
+
+- update to 0.8.8 and switch to debian patchkit to build with
+ current xorg-x11-server
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
evtouch-20090125-memset.diff
evtouch-dont_include_xf86_ansic_h.patch
evtouch-fix-gcc4.3_v2.diff
evtouch-misc-fixes.patch
xf86-input-evtouch-0.8.7.tar.bz2
xorg-server-1.6.diff
New:
----
01_fix_warnings.patch
02_calibration_1.6.patch
03_server-1.6-ftbfs.diff
04_server-1.7-ftbfs.diff
05_fix_CURSORDIR.diff
06_add_TSC-10_to_evdev_rules.diff
xf86-input-evtouch-0.8.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ x11-input-evtouch.spec ++++++
--- /var/tmp/diff_new_pack.WYoljy/_old 2010-03-09 15:46:48.000000000 +0100
+++ /var/tmp/diff_new_pack.WYoljy/_new 2010-03-09 15:46:48.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package x11-input-evtouch (Version 0.8.7)
+# spec file for package x11-input-evtouch (Version 0.8.8)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,23 +20,24 @@
Name: x11-input-evtouch
BuildRequires: Mesa-devel pkgconfig xorg-x11-proto-devel xorg-x11-server-sdk
-Url: http://stz-softwaretechnik.com/~ke/touchscreen/evtouch.html
-Version: 0.8.7
-Release: 8
+Url: http://www.conan.de/touchscreen/evtouch.html
+Version: 0.8.8
+Release: 1
License: LGPLv2.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/X11/Servers/XF86_4
Summary: X.Org input evtouch driver
ExcludeArch: s390 s390x
Source: xf86-input-evtouch-%{version}.tar.bz2
-Patch0: evtouch-fix-gcc4.3_v2.diff
-Patch1: evtouch-dont_include_xf86_ansic_h.patch
-Patch2: evtouch-misc-fixes.patch
Patch3: evtouch-20080829-add_IDEACO_IDC_6680_Touchscreen_to_udev.diff
Patch4: evtouch-20080901-add_another_Panjit_touchset_device.diff
Patch5: evtouch-20081023-fix-compiler_warning.diff
-Patch6: evtouch-20090125-memset.diff
-Patch7: xorg-server-1.6.diff
+Patch11: 01_fix_warnings.patch
+Patch12: 02_calibration_1.6.patch
+Patch13: 03_server-1.6-ftbfs.diff
+Patch14: 04_server-1.7-ftbfs.diff
+Patch15: 05_fix_CURSORDIR.diff
+Patch16: 06_add_TSC-10_to_evdev_rules.diff
%description
This package contains the X.Org evtouch input drivers.
@@ -49,16 +50,15 @@
%prep
%setup -n xf86-input-evtouch-%{version} -q
-%patch1 -p1
-%patch2 -p1
-%patch0
%patch3 -p0
%patch4 -p0
%patch5 -p1
-%patch6 -p1
-%if %suse_version > 1110
-%patch7 -p0
-%endif
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
%build
./configure \
++++++ 01_fix_warnings.patch ++++++
Remove unused variables and code just to make gcc happy
Index: xserver-xorg-input-evtouch/evtouch.c
===================================================================
--- xserver-xorg-input-evtouch.orig/evtouch.c 2009-01-21 20:06:50.647249439 +0900
+++ xserver-xorg-input-evtouch/evtouch.c 2009-01-21 20:07:39.518253785 +0900
@@ -352,7 +352,6 @@ void EVTouchProcessAbs(EVTouchPrivatePtr
void EVTouchProcessRel(EVTouchPrivatePtr priv)
{
struct input_event *ev; /* packet being/just read */
- int dummy;
ev = &priv->ev;
if ( ev->code == REL_X ) {
@@ -745,17 +744,6 @@ EVTouchNewPacket (EVTouchPrivatePtr priv
-static unsigned char
-EVTouchRead(EVTouchPrivatePtr priv)
-{
- unsigned char c;
- XisbBlockDuration (priv->buffer, EV_TIMEOUT);
- c = XisbRead(priv->buffer);
- return (c);
-}
-
-
-
static Bool
EVTouchGetPacket (EVTouchPrivatePtr priv)
{
++++++ 02_calibration_1.6.patch ++++++
From: Thomas Jaeger
Date: Sun, 22 Mar 2009 20:58:58 -0400
Subject: Make calibration work on xserver-1.6
Stolen from Ubuntu.
Index: xserver-xorg-input-evtouch/ev_calibrate.c
===================================================================
--- xserver-xorg-input-evtouch.orig/ev_calibrate.c
+++ xserver-xorg-input-evtouch/ev_calibrate.c
@@ -218,7 +218,7 @@
int cap_style = CapButt; /* style of the line's edje and */
int join_style = JoinBevel; /* joined lines. */
- int event_mask = ExposureMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask;
+ int event_mask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask;
int depth;
int screen_num;
Index: xserver-xorg-input-evtouch/evtouch.c
===================================================================
--- xserver-xorg-input-evtouch.orig/evtouch.c
+++ xserver-xorg-input-evtouch/evtouch.c
@@ -306,7 +306,7 @@
}
if (pos_changed == 1) {
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
ConvertProc(priv->local, 0, 2,
priv->raw_x, priv->raw_y,
0, 0, 0, 0,
@@ -369,7 +369,7 @@
priv->raw_y = priv->min_y;
}
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
ConvertProc(priv->local, 0, 2,
priv->raw_x, priv->raw_y,
0, 0, 0, 0,
++++++ 03_server-1.6-ftbfs.diff ++++++
From: Julien Cristau
Date: Sun, 17 May 2009 18:54:59 +0200
Subject: Fix build with server 1.6
* uninclude xf86Version.h
* fix InitValuatorClassDeviceStruct usage
* fix input ABI check
Index: xserver-xorg-input-evtouch/evtouch.c
===================================================================
--- xserver-xorg-input-evtouch.orig/evtouch.c
+++ xserver-xorg-input-evtouch/evtouch.c
@@ -30,10 +30,8 @@
#define _evdev_touch_C_
-#include
-#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(3,9,0,0,0)
+#include
#define XFREE86_V4
-#endif
/*****************************************************************************
* Standard Headers
@@ -74,7 +72,6 @@
#include "xf86_OSproc.h"
#include "xf86Xinput.h"
#include "exevents.h"
-#include "xf86OSmouse.h"
#include "randrstr.h"
#ifndef NEED_XF86_TYPES
@@ -139,7 +136,7 @@
"Kenan Esau",
MODINFOSTRING1,
MODINFOSTRING2,
- XF86_VERSION_CURRENT,
+ XORG_VERSION_CURRENT,
0, 8, 8,
ABI_CLASS_XINPUT,
ABI_XINPUT_VERSION,
@@ -652,14 +649,17 @@
* Device reports motions on 2 axes in absolute coordinates.
* Axes min and max values are reported in raw coordinates.
*/
- if (InitValuatorClassDeviceStruct(dev, 2, xf86GetMotionEvents,
+ if (InitValuatorClassDeviceStruct(dev, 2,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
+ xf86GetMotionEvents,
+#endif
local->history_size, Absolute) == FALSE)
{
ErrorF ("Unable to allocate EVTouch touchscreen ValuatorClassDeviceStruct\n");
return !Success;
}
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2
xf86InitValuatorAxisStruct(dev, 0, 0, priv->screen_width,
1024,
EV_AXIS_MIN_RES /* min_res */ ,
++++++ 04_server-1.7-ftbfs.diff ++++++
commit f88ce643a4d343cc27ef6ef7e0bf148f885043ab
Author: Mattia Dongili
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
Index: xserver-xorg-input-evtouch/evtouch.c
===================================================================
--- xserver-xorg-input-evtouch.orig/evtouch.c 2010-02-14 14:08:33.000000000 +0900
+++ xserver-xorg-input-evtouch/evtouch.c 2010-02-14 14:13:51.000000000 +0900
@@ -57,6 +57,7 @@
#define NEED_EVENTS
#include
#include
+#include
#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,98 @@
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++)
+ {
+ if (TestBit(i, priv->key_bitmask))
+ {
+ if (i > num_buttons)
+ num_buttons = i;
+ }
+ }
+ 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 +582,7 @@
DBG (9, XisbTrace (priv->buffer, 1));
-
- if (!priv->buffer)
+ if (!priv->buffer)
{
xf86CloseSerial(local->fd);
local->fd = -1;
@@ -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));
-
#ifndef XFREE86_V4
xf86AddEnabledDevice(local);
#else
@@ -544,8 +612,6 @@
}
-
-
static Bool
DeviceOff (DeviceIntPtr dev)
{
@@ -555,7 +621,7 @@
DBGOUT(2, "EVTouch: %s\n", __FUNCTION__ );
if (local->fd != -1)
- {
+ {
ioctl(local->fd, EVIOCGRAB, (void *)0);
xf86RemoveEnabledDevice (local);
if (priv->buffer)
@@ -577,6 +643,73 @@
}
+static Atom *EvtouchInitButtonLabels(void)
+{
+#ifdef HAVE_LABELS
+ Atom *labels = xalloc(EV_MAX_BUTTONS * sizeof(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);
+
+ return labels;
+#endif
+}
+
+static char* abs_labels[] = {
+ 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_WHEEL
+};
+
+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 +718,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 +727,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 +737,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 +754,29 @@
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 = EvtouchInitButtonLabels();
+ 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 +784,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 +804,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 +834,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 +846,7 @@
return !Success;
}
- /*
+ /*
* Allocate the motion events buffer.
*/
xf86MotionHistoryAllocate (local);
@@ -765,7 +916,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-02-14 14:01:43.000000000 +0900
+++ xserver-xorg-input-evtouch/evtouch.h 2010-02-14 14:08:34.000000000 +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;
++++++ 05_fix_CURSORDIR.diff ++++++
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-02-14 14:08:33.000000000 +0900
+++ xserver-xorg-input-evtouch/ev_calibrate.c 2010-02-14 14:14:06.000000000 +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,
++++++ 06_add_TSC-10_to_evdev_rules.diff ++++++
Add TSC-10 to udev's rules
Index: xserver-xorg-input-evtouch/69-touchscreen.rules
================================================================================
--- xf86-input-evtouch-0.8.8/69-touchscreen.rules
+++ xf86-input-evtouch-0.8.8/69-touchscreen.rules
@@ -52,5 +52,7 @@
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"
# IDEACO IDC 6680 Touchscreen
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="1cb6", ATTRS{idProduct}=="6680", SYMLINK+="input/evtouch_event"
++++++ xf86-input-evtouch-0.8.7.tar.bz2 -> xf86-input-evtouch-0.8.8.tar.bz2 ++++++
++++ 56206 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-evtouch-0.8.7/69-touchscreen.rules new/xf86-input-evtouch-0.8.8/69-touchscreen.rules
--- old/xf86-input-evtouch-0.8.7/69-touchscreen.rules 2007-06-13 17:04:53.000000000 +0200
+++ new/xf86-input-evtouch-0.8.8/69-touchscreen.rules 2008-11-09 19:41:10.000000000 +0100
@@ -7,6 +7,9 @@
# Name can be found in /proc/bus/input/devices ('cat /proc/bus/input/devices')
#
+# Generic ts-adc touchscreen modules
+KERNEL=="event*", SUBSYSTEM=="input", ATTRS{name}=="ts-adc", SYMLINK+="input/evtouch_event"
+
# These are the touchscreens supported by kernel's "usbtouchscreen" module
# eGalax Inc. USB TouchController)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-evtouch-0.8.7/ChangeLog new/xf86-input-evtouch-0.8.8/ChangeLog
--- old/xf86-input-evtouch-0.8.7/ChangeLog 2007-09-09 18:50:30.000000000 +0200
+++ new/xf86-input-evtouch-0.8.8/ChangeLog 2008-11-11 09:54:40.000000000 +0100
@@ -1,3 +1,16 @@
+0.8.8
+ - Fixed RR left an right rotation (gborzi)
+ - Changed code to compile a working driver for both
+ XInput ABI 0.x and 2.0 (Xorg 1.4.0) (me)
+ (Not tested yet for 0.x)
+ - Added improvements to calibrate.sh from Debian package
+ - Added changes to ev_calibrate from Debian package
+ - Added following stuff from Harald Radke to mainstream
+ (harryrat@postnuklear.de):
+ - added support for Option "Rotate" "UD" (upside down) in evtouch
+ input section of xorg.conf
+ - added generic ts-adc touchscreen device to udev rules file
+
0.8.7
- Added Elo Touchscreen to udev-rules (Stephen Webb)
- Added "fix" for AMD64-crashes on touch (Martin Letenay)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-evtouch-0.8.7/calibrate.sh new/xf86-input-evtouch-0.8.8/calibrate.sh
--- old/xf86-input-evtouch-0.8.7/calibrate.sh 2007-03-01 15:45:47.000000000 +0100
+++ new/xf86-input-evtouch-0.8.8/calibrate.sh 2008-11-10 11:55:55.000000000 +0100
@@ -2,9 +2,58 @@
XINIT=`which xinit`
XSERVER=`which X`
EVCALIBRATE=`which ev_calibrate || echo ./ev_calibrate`
+UDI=$(hal-find-by-property --key input.x11_driver --string evtouch)
+MYDPY=":1.0"
+ZENITY=`which zenity`
+KDIALOG=`which kdialog`
+XDIALOG=`which Xdialog`
+
+INFO="You have selected to (re)calibrate your touchscreen.\n\n\
+Move your pen around all edges on the following screen.\n\n\
+If you are done and touched all edges, hit the enter key and wait until \
+the top left crosshair turns red.\nOnce you tap the red crosshair, \
+the next one will turn red going from the top left to the \
+bottom right.\nIf you miss a tap, the right mouse button will \
+take you back one step.\n\n\
+If you tapped the last (bottom right) crosshair, the program will \
+return to your session. Note that changes only take effect after \
+restarting the session."
+
+RESTARTINFO="Touchscreen calibration done\nPlease restart your \
+session to \nmake the changes take effect"
+
+FAILINFO="No evtouch capable device found, if you are sure you have \n\
+an evtouch capable touchscreen, please mail the \
+resulting file of the command \"lshal > evtouch_hal.out\" to the\n\
+ubuntu-mobile@lists.ubuntu.com mailing list, so support for your \
+device can be added."
+
+if [ -z "$UDI" ];then
+ if [ -x "${ZENITY}" ]; then
+ $ZENITY --info --text="${FAILINFO}"
+ elif [ -x "${XDIALOG}" ]; then
+ $XDIALOG --fill --msgbox "${FAILINFO}" 20 40
+ elif [ -x "${KDIALOG}" ]; then
+ $KDIALOG --msgbox "${FAILINFO}"
+ fi
+ exit 0
+fi
+
+if [ -x "${ZENITY}" ]; then
+ $ZENITY --info --text="${INFO}"
+elif [ -x "${XDIALOG}" ]; then
+ $XDIALOG --fill --msgbox "${INFO}" 30 40
+elif [ -x "${KDIALOG}" ]; then
+ $KDIALOG --msgbox "${INFO}"
+fi
echo $EVCALIBRATE
+if [ -n "$DISPLAY" ]; then
+ DPY=$(echo $DISPLAY|sed -e 's/[a-z:]*//g'|cut -d'.' -f1)
+ MYDPY=":$(($DPY+1)).0"
+fi
+
if ! [ -x "$EVCALIBRATE" ] ; then
echo "ev_calibrate not found exiting ..."
exit 1;
@@ -32,6 +81,22 @@
#xinit /usr/bin/ddd ev_calibrate -- /usr/X11R6/bin/X
echo "Starting calibration program..."
sleep 2
+hal-set-property --udi $UDI --key input.x11_options.calibrate --string "1"
+
+$XINIT $EVCALIBRATE -- $XSERVER $MYDPY -auth /dev/null
+
+hal-set-property --remove --udi $UDI --key input.x11_options.calibrate
+
+invoke-rc.d --quiet xserver-xorg-input-evtouch start
+
+rm /tmp/ev_calibrate
+
+if [ -x "${ZENITY}" ]; then
+ $ZENITY --info --text="${RESTARTINFO}"
+elif [ -x "${XDIALOG}" ]; then
+ $XDIALOG --fill --msgbox "${RESTARTINFO}" 10 40
+elif [ -x "${KDIALOG}" ]; then
+ $KDIALOG --msgbox "${RESTARTINFO}"
+fi
-$XINIT $EVCALIBRATE -- $XSERVER
exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-evtouch-0.8.7/config.h.in new/xf86-input-evtouch-0.8.8/config.h.in
--- old/xf86-input-evtouch-0.8.7/config.h.in 2007-09-09 18:27:47.000000000 +0200
+++ new/xf86-input-evtouch-0.8.8/config.h.in 2008-11-09 22:01:06.000000000 +0100
@@ -32,6 +32,10 @@
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-evtouch-0.8.7/configure.ac new/xf86-input-evtouch-0.8.8/configure.ac
--- old/xf86-input-evtouch-0.8.7/configure.ac 2007-09-09 18:23:03.000000000 +0200
+++ new/xf86-input-evtouch-0.8.8/configure.ac 2007-10-09 20:06:02.000000000 +0200
@@ -21,7 +21,7 @@
# Process this file with autoconf to produce a configure script
AC_PREREQ(2.59)
-AC_INIT([xf86-input-evtouch],[0.8.7],[http://www.conan.de/touchscreen/evtouch.html],[xf86-input-evtouch])
+AC_INIT([xf86-input-evtouch],[0.8.8],[http://www.conan.de/touchscreen/evtouch.html],[xf86-input-evtouch])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_AUX_DIR(.)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-evtouch-0.8.7/ev_calibrate.c new/xf86-input-evtouch-0.8.8/ev_calibrate.c
--- old/xf86-input-evtouch-0.8.7/ev_calibrate.c 2007-03-30 17:31:14.000000000 +0200
+++ new/xf86-input-evtouch-0.8.8/ev_calibrate.c 2008-11-10 12:25:32.000000000 +0100
@@ -198,7 +198,7 @@
Pixmap cursor_pic;
XColor cursor_fg, cursor_bg;
XFontStruct* font_info;
- char* font_name = "*-helvetica-*-12-*";
+ char* font_name = "*freemono*";
char str[256];
unsigned int cursor_width, cursor_height;
int hotspot_x, hotspot_y;
@@ -234,7 +234,7 @@
unsigned long black_pixel;
- display = XOpenDisplay(":0");
+ display = XOpenDisplay(getenv("DISPLAY"));
if (display == NULL) {
fprintf(stderr, "Cannot connect to X server %s\n", ":0");
exit(-1);
@@ -553,7 +553,7 @@
/*
Put results to file and screen
*/
- out_file = fopen("out.txt", "w");
+ out_file = fopen("/etc/evtouch/config", "w");
/*
@@ -566,11 +566,10 @@
min_max.max_x,
min_max.max_y);
- fprintf(out_file, " Option \"MinX\" \"%d\"\n", min_max.min_x);
- fprintf(out_file, " Option \"MinY\" \"%d\"\n", min_max.min_y);
- fprintf(out_file, " Option \"MaxX\" \"%d\"\n", min_max.max_x);
- fprintf(out_file, " Option \"MaxY\" \"%d\"\n", min_max.max_y);
-
+ fprintf(out_file, "MINX=\"%d\"\n", min_max.min_x);
+ fprintf(out_file, "MINY=\"%d\"\n", min_max.min_y);
+ fprintf(out_file, "MAXX=\"%d\"\n", min_max.max_x);
+ fprintf(out_file, "MAXY=\"%d\"\n", min_max.max_y);
for (i=0; i<9; i++) {
@@ -602,7 +601,7 @@
i, marker_coordinates[i][1]-click_coordinates[i][1]);
- fprintf(out_file, " Option \"x%d\" \"%d\"\n Option \"y%d\" \"%d\"\n",
+ fprintf(out_file, "X%d=\"%d\"\nY%d=\"%d\"\n",
i, marker_coordinates[i][0]-click_coordinates[i][0],
i, marker_coordinates[i][1]-click_coordinates[i][1]);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-evtouch-0.8.7/evtouch.c new/xf86-input-evtouch-0.8.8/evtouch.c
--- old/xf86-input-evtouch-0.8.7/evtouch.c 2007-09-09 18:44:07.000000000 +0200
+++ new/xf86-input-evtouch-0.8.8/evtouch.c 2008-11-11 09:47:55.000000000 +0100
@@ -81,11 +81,13 @@
#define NEED_XF86_TYPES /* for xisb.h when !XFree86LOADER */
#endif
-#include "compiler.h"
+#define DBG(lvl, f) {if ((lvl) <= debug_level) f;}
+#include "compiler.h"
#include "xisb.h"
#include
+
/*****************************************************************************
* Local Headers
****************************************************************************/
@@ -105,6 +107,18 @@
EVTouchPreInit(InputDriverPtr drv, IDevPtr dev, int flags);
static void
EVTouchPtrCtrl(DeviceIntPtr device, PtrCtrl *ctrl);
+static Bool
+ConvertProc ( LocalDevicePtr local,
+ int first,
+ int num,
+ int v0,
+ int v1,
+ int v2,
+ int v3,
+ int v4,
+ int v5,
+ int *x,
+ int *y );
static int debug_level = 0;
@@ -119,15 +133,6 @@
};
#ifdef XFree86LOADER
-ModuleInfoRec EVTouchInfo = {
- 1,
- "EVTOUCH",
- NULL,
- 0,
- NULL /*EVTouchAvailableOptions*/,
-};
-
-
static XF86ModuleVersionInfo VersionRec =
{
"evtouch",
@@ -135,7 +140,7 @@
MODINFOSTRING1,
MODINFOSTRING2,
XF86_VERSION_CURRENT,
- 0, 8, 7,
+ 0, 8, 8,
ABI_CLASS_XINPUT,
ABI_XINPUT_VERSION,
MOD_CLASS_XINPUT,
@@ -150,7 +155,6 @@
int *errmaj,
int *errmin )
{
- xf86AddModuleInfo(&EVTouchInfo, module);
xf86AddInputDriver(&EVTOUCH, module, 0);
return module;
}
@@ -288,19 +292,31 @@
void EVTouchProcessAbs(EVTouchPrivatePtr priv)
{
struct input_event *ev; /* packet being/just read */
-
+ int pos_changed = 0;
ev = &priv->ev;
if ( (ev->code == ABS_X) || (ev->code == ABS_Z) ) {
- priv->cur_x = ev->value;
- libtouchSetXPos(priv->libtouch, priv->cur_x);
+ priv->raw_x = ev->value;
+ pos_changed = 1;
}
if ( (ev->code == ABS_Y) || (ev->code == ABS_RX) ) {
- priv->cur_y = ev->value;
- libtouchSetYPos(priv->libtouch, priv->cur_y);
+ priv->raw_y = ev->value;
+ pos_changed = 1;
}
+ if (pos_changed == 1) {
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
+ ConvertProc(priv->local, 0, 2,
+ priv->raw_x, priv->raw_y,
+ 0, 0, 0, 0,
+ &priv->cur_x, &priv->cur_y);
+#endif
+
+ libtouchSetPos(priv->libtouch, priv->cur_x, priv->cur_y);
+ return;
+ }
+
if (ev->code == ABS_WHEEL) {
LocalDevicePtr local = priv->local;
@@ -336,24 +352,30 @@
void EVTouchProcessRel(EVTouchPrivatePtr priv)
{
struct input_event *ev; /* packet being/just read */
+ int dummy;
ev = &priv->ev;
if ( ev->code == REL_X ) {
- priv->cur_x += ev->value;
- if (priv->cur_x > priv->max_x)
- priv->cur_x = priv->max_x;
- if (priv->cur_x < priv->min_x)
- priv->cur_x = priv->min_x;
- return;
+ priv->raw_x += ev->value;
+ if (priv->raw_x > priv->max_x)
+ priv->raw_x = priv->max_x;
+ if (priv->raw_x < priv->min_x)
+ priv->raw_x = priv->min_x;
}
if ( ev->code == REL_Y ) {
- priv->cur_y += ev->value;
- if (priv->cur_y > priv->max_y)
- priv->cur_y = priv->max_y;
- if (priv->cur_y < priv->min_y)
- priv->cur_y = priv->min_y;
- return;
+ priv->raw_y += ev->value;
+ if (priv->raw_y > priv->max_y)
+ priv->raw_y = priv->max_y;
+ if (priv->raw_y < priv->min_y)
+ priv->raw_y = priv->min_y;
}
+
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
+ ConvertProc(priv->local, 0, 2,
+ priv->raw_x, priv->raw_y,
+ 0, 0, 0, 0,
+ &priv->cur_x, &priv->cur_y);
+#endif
libtouchSetPos(priv->libtouch, priv->cur_x, priv->cur_y);
}
@@ -616,8 +638,8 @@
DBGOUT(2, "EVTouch: %s btn_count=%d\n", __FUNCTION__,
priv->btn_count);
priv->btn_actions = xcalloc(priv->btn_count, sizeof(BtnAction));
- xf86memset(priv->btn_actions, 0,
- priv->btn_count * sizeof(BtnAction));
+ memset(priv->btn_actions, 0,
+ priv->btn_count * sizeof(BtnAction));
DBGOUT(2, "EVTouch: %s btn_count=%d\n", __FUNCTION__,
priv->btn_count);
@@ -638,20 +660,27 @@
return !Success;
}
- xf86InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2
+ xf86InitValuatorAxisStruct(dev, 0, 0, priv->screen_width,
1024,
EV_AXIS_MIN_RES /* min_res */ ,
EV_AXIS_MAX_RES /* max_res */ );
xf86InitValuatorDefaults(dev, 0);
- xf86InitValuatorAxisStruct(dev, 1, priv->min_y, priv->max_y,
+ xf86InitValuatorAxisStruct(dev, 1, 0, priv->screen_height,
1024,
EV_AXIS_MIN_RES /* min_res */ ,
EV_AXIS_MAX_RES /* max_res */ );
xf86InitValuatorDefaults(dev, 1);
+#else
+ xf86InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x,
+ xf86InitValuatorDefaults(dev, 1);
+#endif
/* Initial position of pointer on screen: Centered */
priv->cur_x=(priv->max_x - priv->min_x)/2;
priv->cur_y=(priv->max_y - priv->min_y)/2;
+ priv->raw_x=priv->cur_x;
+ priv->raw_y=priv->cur_y;
libtouchSetPos(priv->libtouch, priv->cur_x, priv->cur_y);
@@ -708,7 +737,7 @@
static void
EVTouchNewPacket (EVTouchPrivatePtr priv)
{
- xf86memset(&priv->ev, 0, sizeof(struct input_event));
+ memset(&priv->ev, 0, sizeof(struct input_event));
priv->packeti = 0;
priv->binary_pkt = FALSE;
}
@@ -781,7 +810,7 @@
priv->screen_num,
priv->cur_x,
priv->cur_y);
-
+
xf86PostProximityEvent(local->dev, 1, 0, 2,
priv->cur_x,
priv->cur_y);
@@ -906,13 +935,14 @@
DBGOUT(2, "EVTouch: FIRST: v0=%d v1=%d\n", v0, v1);
- /*correction of raw coordinates*/
- if ( (priv->fifo>0) && (priv->calibrate) ){
+ /*write raw coordinates to fifo for calibration programm*/
+ if ( (priv->fifo > 0) && (priv->calibrate) ){
DBGOUT(2, "EVTouch: writing to FIFO\n");
write (priv->fifo, &v0, sizeof(v0));
write (priv->fifo, &v1, sizeof(v1));
}
+ /*correction of raw coordinates*/
if (!priv->calibrate) {
DBGOUT(2, "EVTouch: Scaling coordinates\n");
xc = v0 - priv->min_x;
@@ -929,6 +959,10 @@
screen_height = pScrn->currentMode->HDisplay;
}
+ if ( rotation == RR_Rotate_90 || rotation == RR_Rotate_270 ) {
+ int tmp = screen_width; screen_width = screen_height;
+ screen_height = tmp;
+ }
if (xc < (max_x / 2)) {
/*
@@ -1050,7 +1084,10 @@
tmp = xc;
xc = screen_height - yc;
yc = tmp;
- }
+ } else if (priv->rotate == EV_ROTATE_UD) {
+ xc = screen_width - xc;
+ yc = screen_height - yc;
+ }
switch (rotation) {
case RR_Rotate_0:
@@ -1207,9 +1244,7 @@
priv->diff[i][0], priv->diff[i][1]);
}
- xf86AlwaysCore(local, TRUE);
priv->touch_flags = 0;
-
local->history_size = xf86SetIntOption( local->options, "HistorySize", 0 );
/* prepare to process touch packets */
@@ -1235,6 +1270,9 @@
return (local);
}
+
+
+
static void
EVTouchPtrCtrl(DeviceIntPtr device, PtrCtrl *ctrl)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-evtouch-0.8.7/evtouch.h new/xf86-input-evtouch-0.8.8/evtouch.h
--- old/xf86-input-evtouch-0.8.7/evtouch.h 2007-09-09 18:44:56.000000000 +0200
+++ new/xf86-input-evtouch-0.8.8/evtouch.h 2008-11-09 21:53:10.000000000 +0100
@@ -42,6 +42,7 @@
#define EV_ROTATE_NONE 0
#define EV_ROTATE_CW 1
#define EV_ROTATE_CCW 2
+#define EV_ROTATE_UD 3
#define EV_AXIS_MIN_RES 0
#define EV_AXIS_MAX_RES 1024
@@ -94,6 +95,8 @@
int cur_x;
int cur_y;
+ int raw_x;
+ int raw_y;
/* pointers to the current viewport coordinates */
int *pViewPort_X0; /* Min X */
int *pViewPort_X1; /* Max X */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-evtouch-0.8.7/libtouch.c new/xf86-input-evtouch-0.8.8/libtouch.c
--- old/xf86-input-evtouch-0.8.7/libtouch.c 2007-09-09 14:23:31.000000000 +0200
+++ new/xf86-input-evtouch-0.8.8/libtouch.c 2008-11-11 10:06:18.000000000 +0100
@@ -34,7 +34,6 @@
#ifndef NEED_XF86_TYPES
#define NEED_XF86_TYPES
#endif
-#include
#include
#include
#include
@@ -187,7 +186,7 @@
char *str;
- xf86memset(libtouch, 0, sizeof(LibTouchRec));
+ memset(libtouch, 0, sizeof(LibTouchRec));
libtouch->now = GetTimeInMillis();
libtouch->past = libtouch->now;
@@ -229,7 +228,6 @@
}
}
-
dump_configuration();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-evtouch-0.8.7/make_distrib.sh new/xf86-input-evtouch-0.8.8/make_distrib.sh
--- old/xf86-input-evtouch-0.8.7/make_distrib.sh 2007-04-26 13:00:19.000000000 +0200
+++ new/xf86-input-evtouch-0.8.8/make_distrib.sh 2007-10-09 18:59:22.000000000 +0200
@@ -1,5 +1,5 @@
#!/bin/bash
-DISTRI_FILES=".libs/evtouch_drv.so ev_calibrate empty_cursor.xbm ChangeLog TODO README README.calibration INSTALL calibrate.sh Makefile.am configure.ac"
+DISTRI_FILES=".libs/evtouch_drv.so ev_calibrate empty_cursor.xbm ChangeLog TODO README README.calibration INSTALL calibrate.sh Makefile.am autogen.sh configure.ac 69-touchscreen.rules"
SRC_DISTRI_FILES="*.[ch] Imakefile make_distrib.sh"
VERSION=$1
TGT_DIR="evtouch-$1"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org