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

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



 .gitignore   |   29 ++++++++++++++++++++++++++
 configure.ac |    2 -
 src/acecad.c |   64 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
 3 files changed, 85 insertions(+), 10 deletions(-)

New commits:
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? */

commit 38ba390f775e2f6001c8887328c5b925f623308a
Author: Julien Cristau <jcristau@debian.org>
Date:   Fri Sep 7 02:17:29 2007 +0200

    Bump to 1.2.1

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

commit 8bcc6d22889cc40c6b7d1582f87d4b2a816167ab
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Tue Aug 28 17:31:54 2007 -0700

    Make compatible with new input ABI

diff --git a/src/acecad.c b/src/acecad.c
index ec5f83e..9b14e48 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -70,6 +70,12 @@
 #endif
 #endif
 
+/* Previously found in xf86Xinput.h */
+#ifdef DBG
+#undef DBG
+#endif
+#define DBG(lvl, f) {if ((lvl) <= xf86GetVerbosity()) f;}
+
 /*****************************************************************************
  *	Local Headers
  ****************************************************************************/
@@ -349,7 +355,9 @@ AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
     local->name = dev->identifier;
     local->type_name = "ACECAD Tablet";
     local->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
     local->motion_history_proc = xf86GetMotionEvents;
+#endif
     local->control_proc = NULL;
     local->close_proc = CloseProc;
     local->switch_mode = NULL;

commit 171d4c8dc6136aa8c14aedd0ee107d6ba957de04
Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date:   Mon Jul 9 11:03:00 2007 +0200

    Don't crash X when the tablet wasn't found.
    
    X would crash when switching to console if the acecad module was loaded but the tablet had not been configured.
    
    Fix by properly freeing structures before returning NULL in PreInit()

diff --git a/src/acecad.c b/src/acecad.c
index 829261f..ec5f83e 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -488,8 +488,12 @@ SetupProc_fail:
         xf86CloseSerial (local->fd);
     if ((priv) && (priv->buffer))
         XisbFree (priv->buffer);
-    if (priv)
+    if (priv) {
         xfree (priv);
+	if (local)
+		local->private = NULL;
+    }
+    xf86DeleteInput(local, 0);
     return NULL;
 }
 

commit c69e2c95b9eb2381709c9de14957d24ab919b5bc
Author: Matthieu Herrb <matthieu@deville.herrb.com>
Date:   Wed May 30 23:34:13 2007 -0600

    fix build on BSD systems.

diff --git a/src/acecad.c b/src/acecad.c
index c146105..829261f 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -61,8 +61,8 @@
 #include <string.h>
 #include <stdio.h>
 
-#ifdef LINUX_INPUT
 #include <errno.h>
+#ifdef LINUX_INPUT
 #include <fcntl.h>
 #ifdef LINUX_SYSFS
 #include <sysfs/libsysfs.h>

commit 62bce174e7a3c896fabe40813639e479d9652452
Author: Matthieu Herrb <matthieu@deville.herrb.com>
Date:   Wed May 30 23:33:56 2007 -0600

    Add .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5bd25d2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,29 @@
+*~
+*.la
+*.lo
+.#*
+.deps
+.libs
+Makefile
+Makefile.in
+aclocal.m4
+ati.4
+ati.4x
+autom4te.cache
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+configure.lineno
+cscope.files
+cscope.out
+depcomp
+install-sh
+libtool
+ltmain.sh
+missing
+stamp-h1


Reply to: