[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-acecad: Changes to 'upstream-experimental'



 .gitignore      |    4 +
 Makefile.am     |    8 +--
 README          |   20 +++++++
 configure.ac    |   25 +++++----
 man/acecad.man  |    2 
 src/Makefile.am |    7 ++
 src/acecad.c    |  141 ++++++++++++++++++++++++++++++++++----------------------
 src/acecad.h    |    2 
 8 files changed, 137 insertions(+), 72 deletions(-)

New commits:
commit 1685d3b518cf5fe4cc6a8fb3e3c28beb9b3ddb82
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Feb 24 13:22:46 2009 +1000

    acecad 1.3.0
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index e87d22c..1787cb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-acecad],
-        1.2.2,
+        1.3.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-acecad)
 

commit 61ad1d4470491bd49484de0b6e4eb65a7a51c799
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date:   Mon Feb 2 18:02:43 2009 -0200

    Janitor: Correct make distcheck and minor configure.ac cleanup.

diff --git a/.gitignore b/.gitignore
index 5bd25d2..0f74990 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,7 @@ libtool
 ltmain.sh
 missing
 stamp-h1
+*.4
+xf86-input-acecad-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index af2effb..6a0325e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,14 +20,12 @@
 
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = src man
-
-EXTRA_DIST = autogen.sh ChangeLog
-
-CLEANFILES = ChangeLog
+EXTRA_DIST = ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
 
 .PHONY: ChangeLog
 
 ChangeLog:
-	(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+	$(CHANGELOG_CMD)
 
 dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index 392921e..e87d22c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
-DRIVER_NAME=acecad
-AC_SUBST([DRIVER_NAME])
-
+# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
 AM_CONFIG_HEADER([config.h])
 
 # Checks for programs.
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 AC_PROG_CC
+XORG_CWARNFLAGS
 
 AH_TOP([#include "xorg-server.h"])
 
@@ -77,9 +78,7 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto $REQUIRED_MODULES)
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
-
-CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
-AC_SUBST([CFLAGS])
+XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS"
 
 # Checks for libraries.
 
@@ -94,7 +93,11 @@ if test x$HAVE_LIBSYSFS = xyes; then
 fi
 AM_CONDITIONAL(HAVE_LIBSYSFS, test x$HAVE_LIBSYSFS = xyes)
 
+DRIVER_NAME=acecad
+AC_SUBST([DRIVER_NAME])
+
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([Makefile src/Makefile man/Makefile])
diff --git a/src/Makefile.am b/src/Makefile.am
index 65b449b..fd1a098 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,6 +24,8 @@
 # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
+AM_CFLAGS = $(XORG_CFLAGS)
+
 @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
 @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
 

commit 482471e4fe445da6d5307d3a16e53de6afa143e8
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Jan 29 15:09:23 2009 -0800

    Add README with pointers to mailing list, bugzilla & git repos

diff --git a/README b/README
new file mode 100644
index 0000000..5028b73
--- /dev/null
+++ b/README
@@ -0,0 +1,20 @@
+xf86-input-acecad - Acecad Flair input driver for the Xorg X server
+
+Please submit bugs & patches to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/driver/xf86-input-acecad
+
+        http://cgit.freedesktop.org/xorg/driver/xf86-input-acecad
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage

commit ef3446502993c8492149fd319a49f6bd894efb7a
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri Jan 9 16:09:43 2009 -0800

    Remove xorgconfig & xorgcfg from See Also list in man page

diff --git a/man/acecad.man b/man/acecad.man
index a9cb68c..445951e 100644
--- a/man/acecad.man
+++ b/man/acecad.man
@@ -33,7 +33,7 @@ section only covers configuration details specific to this driver.
 .PP
 Config details...
 .SH "SEE ALSO"
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__).
+__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__).
 .SH AUTHORS
 Authors include...
 Edouard TISSERANT

commit b9497ba77692f2d44a9a1339ae2d0ff436abed70
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date:   Fri Nov 28 04:48:50 2008 -0200

    Correct wrong check for Linux libsysfs.
    
      This patch was the original one, and the previous test was a wrong
    attempt to simplify the change.
      Triggered by tinderbox build.

diff --git a/configure.ac b/configure.ac
index 73402a6..392921e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,8 +89,9 @@ AC_HEADER_CHECK([linux/input.h],
 		[AC_DEFINE([LINUX_INPUT], [1], [Using the Linux input subsystem])]
 		)
 AC_CHECK_HEADER(sysfs/libsysfs.h, HAVE_LIBSYSFS=yes, HAVE_LIBSYSFS=no)
-AC_DEFINE(LINUX_SYSFS, test x$HAVE_LIBSYSFS = xyes,
-	  [Using sysfs to probe devices])
+if test x$HAVE_LIBSYSFS = xyes; then
+    AC_DEFINE(LINUX_SYSFS, 1, [Using sysfs to probe devices])
+fi
 AM_CONDITIONAL(HAVE_LIBSYSFS, test x$HAVE_LIBSYSFS = xyes)
 
 XORG_MANPAGE_SECTIONS

commit 36675d65ddc1ed35190f5fdbb18d5b460c7ba972
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date:   Fri Nov 28 01:45:54 2008 -0200

    Dont dlopen libsysfs.so, instead, link with it when available.

diff --git a/configure.ac b/configure.ac
index 9fea96e..73402a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,9 +88,10 @@ AC_HEADER_STDC
 AC_HEADER_CHECK([linux/input.h],
 		[AC_DEFINE([LINUX_INPUT], [1], [Using the Linux input subsystem])]
 		)
-AC_HEADER_CHECK([sysfs/libsysfs.h],
-		[AC_DEFINE([LINUX_SYSFS], [1], [Using sysfs to probe devices])]
-		)
+AC_CHECK_HEADER(sysfs/libsysfs.h, HAVE_LIBSYSFS=yes, HAVE_LIBSYSFS=no)
+AC_DEFINE(LINUX_SYSFS, test x$HAVE_LIBSYSFS = xyes,
+	  [Using sysfs to probe devices])
+AM_CONDITIONAL(HAVE_LIBSYSFS, test x$HAVE_LIBSYSFS = xyes)
 
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
diff --git a/src/Makefile.am b/src/Makefile.am
index 5ff68eb..65b449b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -26,6 +26,11 @@
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
 @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
 @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
+
+if HAVE_LIBSYSFS
+@DRIVER_NAME@_drv_la_LIBADD = -lsysfs
+endif
+
 @DRIVER_NAME@_drv_ladir = @inputdir@
 
 @DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c @DRIVER_NAME@.h
diff --git a/src/acecad.c b/src/acecad.c
index f3c284a..63c5aaf 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -245,53 +245,48 @@ AceCadAutoDevProbe(LocalDevicePtr local, int verb)
     char *link = NULL;
     struct dlist *devs = NULL;
     struct dlist *links = NULL;
-    void *libsysfs = NULL;
-
-    if ((libsysfs = dlopen("libsysfs.so", RTLD_NOW | RTLD_GLOBAL))) {
-        xf86MsgVerb(X_INFO, verb, "%s: querying sysfs for Acecad tablets\n", local->name);
-        usb_bus = sysfs_open_bus(usb_bus_name);
-        if (usb_bus) {
-            xf86MsgVerb(X_PROBED, 4, "%s: usb bus opened\n", local->name);
-            acecad_driver = sysfs_get_bus_driver(usb_bus, acecad_driver_name);
-            if (acecad_driver) {
-                xf86MsgVerb(X_PROBED, 4, "%s: usb_acecad driver opened\n", local->name);
-                devs = sysfs_get_driver_devices(acecad_driver);
-                if (devs) {
-                    xf86MsgVerb(X_PROBED, 4, "%s: usb_acecad devices retrieved\n", local->name);
-                    dlist_for_each_data(devs, candidate, struct sysfs_device) {
-                        xf86MsgVerb(X_PROBED, 4, "%s: device %s at %s\n", local->name, candidate->name, candidate->path);
-                        links = sysfs_open_link_list(candidate->path);
-                        dlist_for_each_data(links, link, char) {
-                            if (sscanf(link, "input:event%d", &i) == 1) {
-                                xf86MsgVerb(X_PROBED, 4, "%s: device %s at %s: %s\n", local->name, candidate->name, candidate->path, link);
-                                break;
-                            }
-                        }
-                        sysfs_close_list(links);
-                        if (i > 0) /* We found something */
-                            break;
-                    }
-                } else
-                    xf86MsgVerb(X_WARNING, 4, "%s: no usb_acecad devices found\n", local->name);
-            } else
-                xf86MsgVerb(X_WARNING, 4, "%s: usb_acecad driver not found\n", local->name);
-        } else
-            xf86MsgVerb(X_WARNING, 4, "%s: usb bus not found\n", local->name);
-        sysfs_close_bus(usb_bus);
-        dlclose(libsysfs);
-
-        if (i > 0) {
-            /* We found something */
-            np = SET_EVENT_NUM(fname, i);
-            if (np < 0 || np >= EV_DEV_NAME_MAXLEN) {
-                xf86MsgVerb(X_WARNING, verb, "%s: unable to manage event device %d\n", local->name, i);
-            } else {
-                goto ProbeFound;
-            }
-        } else
-            xf86MsgVerb(X_WARNING, verb, "%s: no Acecad devices found via sysfs\n", local->name);
+
+    xf86MsgVerb(X_INFO, verb, "%s: querying sysfs for Acecad tablets\n", local->name);
+    usb_bus = sysfs_open_bus(usb_bus_name);
+    if (usb_bus) {
+	xf86MsgVerb(X_PROBED, 4, "%s: usb bus opened\n", local->name);
+	acecad_driver = sysfs_get_bus_driver(usb_bus, acecad_driver_name);
+	if (acecad_driver) {
+	    xf86MsgVerb(X_PROBED, 4, "%s: usb_acecad driver opened\n", local->name);
+	    devs = sysfs_get_driver_devices(acecad_driver);
+	    if (devs) {
+		xf86MsgVerb(X_PROBED, 4, "%s: usb_acecad devices retrieved\n", local->name);
+		dlist_for_each_data(devs, candidate, struct sysfs_device) {
+		    xf86MsgVerb(X_PROBED, 4, "%s: device %s at %s\n", local->name, candidate->name, candidate->path);
+		    links = sysfs_open_link_list(candidate->path);
+		    dlist_for_each_data(links, link, char) {
+			if (sscanf(link, "input:event%d", &i) == 1) {
+			    xf86MsgVerb(X_PROBED, 4, "%s: device %s at %s: %s\n", local->name, candidate->name, candidate->path, link);
+			    break;
+			}
+		    }
+		    sysfs_close_list(links);
+		    if (i > 0) /* We found something */
+			break;
+		}
+	    } else
+		xf86MsgVerb(X_WARNING, 4, "%s: no usb_acecad devices found\n", local->name);
+	} else
+	    xf86MsgVerb(X_WARNING, 4, "%s: usb_acecad driver not found\n", local->name);
+    } else
+	xf86MsgVerb(X_WARNING, 4, "%s: usb bus not found\n", local->name);
+    sysfs_close_bus(usb_bus);
+
+    if (i > 0) {
+	/* We found something */
+	np = SET_EVENT_NUM(fname, i);
+	if (np < 0 || np >= EV_DEV_NAME_MAXLEN) {
+	    xf86MsgVerb(X_WARNING, verb, "%s: unable to manage event device %d\n", local->name, i);
+	} else {
+	    goto ProbeFound;
+	}
     } else
-        xf86MsgVerb(X_WARNING, 4, "%s: libsysfs not found\n", local->name);
+	xf86MsgVerb(X_WARNING, verb, "%s: no Acecad devices found via sysfs\n", local->name);
 
 #endif
 

commit 791cbbf9df621d9712731990271bf3b53076673a
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date:   Mon May 26 22:00:23 2008 +0930

    Check for XINPUT ABI 3.

diff --git a/src/acecad.c b/src/acecad.c
index 71d2578..f3c284a 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -657,7 +657,10 @@ DeviceInit (DeviceIntPtr dev)
 
 
     /* 3 axes */
-    if (InitValuatorClassDeviceStruct (dev, 3, xf86GetMotionEvents,
+    if (InitValuatorClassDeviceStruct (dev, 3,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
+                xf86GetMotionEvents,
+#endif
                 local->history_size,
                 ((priv->flags & ABSOLUTE_FLAG)? Absolute: Relative)|OutOfProximity)
             == FALSE)

commit 33e64334db17ed3d2307e3ac465450c5c9b39ad9
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date:   Sun Mar 16 03:01:23 2008 -0300

    Compile warning fixes.
    
    Don't call xf86usleep, just call usleep directly.
    Remove unused variables.
    
    Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>

diff --git a/src/acecad.c b/src/acecad.c
index 41caa8c..71d2578 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -245,10 +245,9 @@ AceCadAutoDevProbe(LocalDevicePtr local, int verb)
     char *link = NULL;
     struct dlist *devs = NULL;
     struct dlist *links = NULL;
-    unsigned int major = 0, minor = 0;
     void *libsysfs = NULL;
 
-    if (libsysfs = dlopen("libsysfs.so", RTLD_NOW | RTLD_GLOBAL)) {
+    if ((libsysfs = dlopen("libsysfs.so", RTLD_NOW | RTLD_GLOBAL))) {
         xf86MsgVerb(X_INFO, verb, "%s: querying sysfs for Acecad tablets\n", local->name);
         usb_bus = sysfs_open_bus(usb_bus_name);
         if (usb_bus) {
diff --git a/src/acecad.h b/src/acecad.h
index 2f910ea..9acfca2 100644
--- a/src/acecad.h
+++ b/src/acecad.h
@@ -63,7 +63,7 @@
 
 #define NOTAVAIL ((errno == ENODEV) || (errno == ENXIO) || (errno == ENOENT))
 
-#define milisleep(ms) xf86usleep (ms * 1000)
+#define milisleep(ms) usleep (ms * 1000)
 
 #define SYSCALL(call) while(((call) == -1) && (errno == EINTR))
 

commit 60270d38257797a82eff74a56d1561068a6c348e
Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date:   Sun Feb 10 08:52:46 2008 +0100

    Bump to 1.2.2

diff --git a/configure.ac b/configure.ac
index 694e2c4..9fea96e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-acecad],
-        1.2.1,
+        1.2.2,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-acecad)
 

commit 7cabee107798341c6c78632f56518a722ed15f03
Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date:   Sat Feb 9 22:32:13 2008 +0100

    acecad: fix blotchy input in Inkscape and the Gimp by not pretending to be the core pointer by default

diff --git a/src/acecad.c b/src/acecad.c
index 1e4cd02..41caa8c 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -738,7 +738,7 @@ ReadInput (LocalDevicePtr local)
 {
     int x, y, z;
     int prox, buttons;
-    int is_core_pointer = 1, is_absolute;
+    int is_core_pointer = 0, is_absolute;
     AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private);
 
     /*xf86Msg(X_INFO, "ACECAD Tablet Read Input\n");*/
@@ -848,7 +848,7 @@ USBReadInput (LocalDevicePtr local)
     int report_x, report_y;
     int prox = priv->acecadOldProximity;
     int buttons = priv->acecadOldButtons;
-    int is_core_pointer = 1;
+    int is_core_pointer = 0;
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
     is_core_pointer = xf86IsCorePointer(local->dev);
 #endif

commit 079e56633f700b2a0e0240501d31e4a9e5007a4f
Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date:   Sat Feb 9 19:51:57 2008 +0100

    acecad: improve handling of botched input versions

diff --git a/src/acecad.c b/src/acecad.c
index a522205..1e4cd02 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -29,6 +29,11 @@
 
 #include <xorgVersion.h>
 #define XORG_VERSION_BOTCHED XORG_VERSION_NUMERIC(1,4,0,0,0)
+#if XORG_VERSION_CURRENT >= XORG_VERSION_BOTCHED
+#define XORG_BOTCHED_INPUT 1
+#else
+#define XORG_BOTCHED_INPUT 0
+#endif
 
 #define _ACECAD_C_
 /*****************************************************************************
@@ -667,7 +672,7 @@ DeviceInit (DeviceIntPtr dev)
         InitValuatorAxisStruct(dev,
                 0,
                 0,			/* min val */
-#if XORG_VERSION_CURRENT == XORG_VERSION_BOTCHED
+#if XORG_BOTCHED_INPUT
                 screenInfo.screens[0]->width,
 #else
                 priv->acecadMaxX,	/* max val */
@@ -678,7 +683,7 @@ DeviceInit (DeviceIntPtr dev)
         InitValuatorAxisStruct(dev,
                 1,
                 0,			/* min val */
-#if XORG_VERSION_CURRENT == XORG_VERSION_BOTCHED
+#if XORG_BOTCHED_INPUT
                 screenInfo.screens[0]->height,
 #else
                 priv->acecadMaxY,	/* max val */
@@ -938,7 +943,7 @@ USBReadInput (LocalDevicePtr local)
 
         if (prox)
         {
-#if XORG_VERSION_CURRENT == XORG_VERSION_BOTCHED
+#if XORG_BOTCHED_INPUT
             ConvertProc(local, 0, 3, x, y, 0, 0, 0, 0, &report_x, &report_y);
 #else
             report_x = x;

commit bf27c55a83a83fea4afe0499d1b2d592110e945a
Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date:   Sun Oct 28 01:12:28 2007 +0200

    acecad: fake device limits == screen limits in xserver 1.4 for xinput
    
    xserver 1.4 does not do automatic coordinate scaling, so we have to do
    it manually. But this breaks xinput clients that do their own scaling
    using the device limits as reference. Pretend that they are the same as the
    screen limits to work around this.

diff --git a/src/acecad.c b/src/acecad.c
index f67ffe3..a522205 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -27,6 +27,9 @@
 
 #include "config.h"
 
+#include <xorgVersion.h>
+#define XORG_VERSION_BOTCHED XORG_VERSION_NUMERIC(1,4,0,0,0)
+
 #define _ACECAD_C_
 /*****************************************************************************
  *	Standard Headers
@@ -664,14 +667,22 @@ DeviceInit (DeviceIntPtr dev)
         InitValuatorAxisStruct(dev,
                 0,
                 0,			/* min val */
+#if XORG_VERSION_CURRENT == XORG_VERSION_BOTCHED
+                screenInfo.screens[0]->width,
+#else
                 priv->acecadMaxX,	/* max val */
+#endif
                 1000,			/* resolution */
                 0,			/* min_res */
                 1000);			/* max_res */
         InitValuatorAxisStruct(dev,
                 1,
                 0,			/* min val */
+#if XORG_VERSION_CURRENT == XORG_VERSION_BOTCHED
+                screenInfo.screens[0]->height,
+#else
                 priv->acecadMaxY,	/* max val */
+#endif
                 1000,			/* resolution */
                 0,			/* min_res */
                 1000);			/* max_res */
@@ -927,7 +938,12 @@ USBReadInput (LocalDevicePtr local)
 
         if (prox)
         {
+#if XORG_VERSION_CURRENT == XORG_VERSION_BOTCHED
             ConvertProc(local, 0, 3, x, y, 0, 0, 0, 0, &report_x, &report_y);
+#else
+            report_x = x;
+            report_y = y;
+#endif
             if (!(priv->acecadOldProximity))
                 if (!is_core_pointer)
                 {
@@ -954,7 +970,7 @@ USBReadInput (LocalDevicePtr local)
             if (!is_core_pointer)
                 if (priv->acecadOldProximity)
                 {
-                    xf86PostProximityEvent(local->dev, 0, 0, 3, x,y,z);
+                    xf86PostProximityEvent(local->dev, 0, 0, 3, report_x, report_y, z);
                 }
             priv->acecadOldProximity = 0;
         }
@@ -1003,8 +1019,10 @@ ReverseConvertProc (LocalDevicePtr local,
 {
     AceCadPrivatePtr priv = (AceCadPrivatePtr)(local->private);
 
+    // xf86Msg(X_INFO, "%s: reverse coordinate conversion in : %d, %d\n", local->name, x, y);
     valuators[0] = x * priv->acecadMaxX / screenInfo.screens[0]->width;
     valuators[1] = y * priv->acecadMaxY / screenInfo.screens[0]->height;
+    // xf86Msg(X_INFO, "%s: reverse coordinate conversion out: %d, %d\n", local->name, valuators[0], valuators[1]);
 
     return TRUE;
 }

commit 3089bc76c7e6a829caff4cb86ca3948401e1b6f3
Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date:   Sat Oct 27 13:08:04 2007 +0200

    acecad: set type_name to XI_TABLET

diff --git a/src/acecad.c b/src/acecad.c
index 6877fe3..f67ffe3 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -353,7 +353,7 @@ AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
     memset(priv, 0, sizeof(AceCadPrivateRec));
 
     local->name = dev->identifier;
-    local->type_name = "ACECAD Tablet";
+    local->type_name = XI_TABLET;
     local->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS;
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
     local->motion_history_proc = xf86GetMotionEvents;

commit 0ee57c9d8048c3e80356a3eab18b6871a21a3a96
Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date:   Fri Oct 26 21:00:19 2007 +0200

    acecad: do our own scaling with USB device since it's not done in the kernel and ConverProc() isn't called automatically by X

diff --git a/src/acecad.c b/src/acecad.c
index 398024f..6877fe3 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -829,6 +829,7 @@ USBReadInput (LocalDevicePtr local)
     int x = priv->acecadOldX;
     int y = priv->acecadOldY;
     int z = priv->acecadOldZ;
+    int report_x, report_y;
     int prox = priv->acecadOldProximity;
     int buttons = priv->acecadOldButtons;
     int is_core_pointer = 1;
@@ -926,14 +927,15 @@ USBReadInput (LocalDevicePtr local)
 
         if (prox)
         {
+            ConvertProc(local, 0, 3, x, y, 0, 0, 0, 0, &report_x, &report_y);
             if (!(priv->acecadOldProximity))
                 if (!is_core_pointer)
                 {
-                    xf86PostProximityEvent(local->dev, 1, 0, 3 , x, y, z);
+                    xf86PostProximityEvent(local->dev, 1, 0, 3 , report_x, report_y, z);
                 }
 
 
-            xf86PostMotionEvent(local->dev, 1, 0, 3, x, y, z);
+            xf86PostMotionEvent(local->dev, 1, 0, 3, report_x, report_y, z);
 
             if (priv->acecadOldButtons != buttons)
             {
@@ -943,7 +945,7 @@ USBReadInput (LocalDevicePtr local)
                     int id = ffs(delta);
                     delta &= ~(1 << (id-1));
 
-                    xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, x, y,z);
+                    xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y, z);
                 }
             }
         }
@@ -984,8 +986,12 @@ ConvertProc (LocalDevicePtr local, int first, int num,
 {
     AceCadPrivatePtr priv = (AceCadPrivatePtr)(local->private);
 
+    /* TODO: should have a structure to hold which screen the
+     * pointer is attached to? */
+    // xf86Msg(X_INFO, "%s: coordinate conversion in : %d, %d\n", local->name, v0, v1);
     *x = v0 * screenInfo.screens[0]->width / priv->acecadMaxX;
     *y = v1 * screenInfo.screens[0]->height / priv->acecadMaxY;
+    // xf86Msg(X_INFO, "%s: coordinate conversion out: %d, %d\n", local->name, *x, *y);
     return TRUE;
 }
 

commit 253ea9de2321bccede3f0d74ee6a6f6b403e80ae
Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date:   Fri Oct 26 20:12:19 2007 +0200

    acecad: don't crash when xf86IsCorePointer is not defined

diff --git a/src/acecad.c b/src/acecad.c
index 9b14e48..398024f 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -722,13 +722,15 @@ ReadInput (LocalDevicePtr local)
 {
     int x, y, z;
     int prox, buttons;
-    int is_core_pointer, is_absolute;
+    int is_core_pointer = 1, is_absolute;
     AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private);
 
     /*xf86Msg(X_INFO, "ACECAD Tablet Read Input\n");*/
 
     is_absolute = (priv->flags & ABSOLUTE_FLAG);
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
     is_core_pointer = xf86IsCorePointer(local->dev);
+#endif
 
     /*
      * set blocking to -1 on the first call because we know there is data to
@@ -829,7 +831,10 @@ USBReadInput (LocalDevicePtr local)
     int z = priv->acecadOldZ;
     int prox = priv->acecadOldProximity;
     int buttons = priv->acecadOldButtons;
-    int is_core_pointer = xf86IsCorePointer(local->dev);
+    int is_core_pointer = 1;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
+    is_core_pointer = xf86IsCorePointer(local->dev);
+#endif
     /* Is autodev active? */
     int autodev = priv->flags & AUTODEV_FLAG;
     /* Was the device available last time we checked? */


Reply to: