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

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



 configure.ac     |   32 ++----------------
 src/xf86Aiptek.c |   95 +++++++++++++++++++++++++++++++++++++++++--------------
 2 files changed, 76 insertions(+), 51 deletions(-)

New commits:
commit 19ab688471916b0b4ab780ea39b60f2199234f54
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Sep 11 12:04:00 2009 +1000

    aiptek 1.3.0

diff --git a/configure.ac b/configure.ac
index 75d14d3..6a807a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-aiptek],
-        1.2.0,
+        1.3.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-aiptek)
 

commit c6628efe89ba9f6d5274e4d5677c039cef89eb6f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Sep 11 12:03:35 2009 +1000

    Require xorg-macros 1.3 for XORG_DEFAULT_OPTIONS.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 6307b89..75d14d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,16 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
-# 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)
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
 AM_CONFIG_HEADER([config.h])
 
 # Checks for programs.
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 AC_PROG_CC
-XORG_CWARNFLAGS
+XORG_DEFAULT_OPTIONS
 
 AH_TOP([#include "xorg-server.h"])
 
@@ -70,8 +70,4 @@ AC_HEADER_STDC
 DRIVER_NAME=aiptek
 AC_SUBST([DRIVER_NAME])
 
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
-
 AC_OUTPUT([Makefile src/Makefile man/Makefile])

commit 51ded98cc9643c6789d3297b4e60097fcb342cd5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Sep 11 12:02:53 2009 +1000

    Remove some unused crap from configure.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index ea887d5..6307b89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,24 +45,6 @@ XORG_CWARNFLAGS
 
 AH_TOP([#include "xorg-server.h"])
 
-#AC_DEFINE(XFree86LOADER,1,[Stub define for loadable drivers])
-#
-#AC_ARG_ENABLE(XINPUT, AS_HELP_STRING([--enable-xinput],
-#              [Build XInput support (default: yes)]),
-#              [XINPUT=$enableval],[XINPUT=yes])
-#AM_CONDITIONAL(XINPUT, test "x$XINPUT" = "xyes")
-#if test "x$XINPUT" = "xyes" ; then
-#    AC_DEFINE(XINPUT,1,[Enable XInput support])
-#fi
-#
-#AC_ARG_ENABLE(XKB, AS_HELP_STRING([--enable-xkb],
-#              [Build XKB support (default: yes)]),
-#              [XKB=$enableval],[XKB=yes])
-#AM_CONDITIONAL(XKB, test "x$XKB" = "xyes")
-#if test "x$XKB" = "xyes" ; then
-#    AC_DEFINE(XKB,1,[Enable XKB support])
-#fi
-
 AC_ARG_WITH(xorg-module-dir,
             AC_HELP_STRING([--with-xorg-module-dir=DIR],
                            [Default xorg module directory [[default=$libdir/xorg/modules]]]),

commit ca98d5b84fa7e4ed4ea0ae09226728ba137f7c46
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Aug 25 21:03:39 2009 +1000

    Hide the InitKeyClassDeviceStruct behind ABI ifdefs.
    
    Function was removed from the server a while ago.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index 8fe3986..96873ab 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -148,25 +148,6 @@ _X_EXPORT InputDriverRec AIPTEK =
 };
 
 /*
- * Function/Macro keys variables.
- *
- * This is a list of X keystrokes the macro keys can send.
- */
-static KeySym aiptek_map[] =
-{
-    /* 0x00 .. 0x07 */
-    NoSymbol,NoSymbol,NoSymbol,NoSymbol,NoSymbol,NoSymbol,NoSymbol,NoSymbol,
-    /* 0x08 .. 0x0f */
-    XK_F1,  XK_F2,  XK_F3,  XK_F4,  XK_F5,  XK_F6,  XK_F7,  XK_F8,
-    /* 0x10 .. 0x17 */
-    XK_F9,  XK_F10, XK_F11, XK_F12, XK_F13, XK_F14, XK_F15, XK_F16,
-    /* 0x18 .. 0x1f */
-    XK_F17, XK_F18, XK_F19, XK_F20, XK_F21, XK_F22, XK_F23, XK_F24,
-    /* 0x20 .. 0x27 */
-    XK_F25, XK_F26, XK_F27, XK_F28, XK_F29, XK_F30, XK_F31, XK_F32
-};
-
-/*
  * This is the map of Linux Event Input system keystrokes sent for
  * the macro keys. There are discrepancies in the mappings, so for example,
  * if we wanted to implement full macro key-to-string conversion in the
@@ -187,12 +168,33 @@ static int linux_inputDevice_keyMap[] =
     KEY_OPEN, KEY_PASTE
 };
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7
+/*
+ * Function/Macro keys variables.
+ *
+ * This is a list of X keystrokes the macro keys can send.
+ */
+static KeySym aiptek_map[] =
+{
+    /* 0x00 .. 0x07 */
+    NoSymbol,NoSymbol,NoSymbol,NoSymbol,NoSymbol,NoSymbol,NoSymbol,NoSymbol,
+    /* 0x08 .. 0x0f */
+    XK_F1,  XK_F2,  XK_F3,  XK_F4,  XK_F5,  XK_F6,  XK_F7,  XK_F8,
+    /* 0x10 .. 0x17 */
+    XK_F9,  XK_F10, XK_F11, XK_F12, XK_F13, XK_F14, XK_F15, XK_F16,
+    /* 0x18 .. 0x1f */
+    XK_F17, XK_F18, XK_F19, XK_F20, XK_F21, XK_F22, XK_F23, XK_F24,
+    /* 0x20 .. 0x27 */
+    XK_F25, XK_F26, XK_F27, XK_F28, XK_F29, XK_F30, XK_F31, XK_F32
+};
+
 /* minKeyCode = 8 because this is the min legal key code */
 static KeySymsRec keysyms =
 {
   /* map        minKeyCode  maxKC   width */
   aiptek_map,   8,          0x27,   1
 };
+#endif
 
 static const char *default_options[] =
 {
@@ -1640,11 +1642,13 @@ xf86AiptekProc(DeviceIntPtr pAiptek, int requestCode)
                 return !Success;
             }
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7
             if (InitKeyClassDeviceStruct(pAiptek, &keysyms, NULL) ==FALSE)
             {
                 ErrorF("Unable to init Key Class Device\n");
                 return !Success;
             }
+#endif
 
             /* we don't label the axes here, done later in
              * xf86AiptedOpenDevice */

commit 3337f41ca5af021fb7ed8db0efc5e39f04e3d012
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Aug 19 15:11:42 2009 +1000

    Reset local->private to NULL after freeing it. (#22693)
    
    If it's not NULL, xf86DeleteInput will try to free it again.
    
    X.Org Bug 22693 <http://bugs.freedesktop.org/show_bug.cgi?id=22693>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index 8402c85..8fe3986 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -2043,6 +2043,7 @@ xf86AiptekUninit(InputDriverPtr    drv,
         xfree(device->common);
     }
     xfree (device);
+    local->private = NULL;
     xf86DeleteInput(local, 0);
 }
 

commit f440e333bb535854ed25e258fc502b1b6a8d5e44
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jun 22 14:12:23 2009 +1000

    Cope with ABI_XINPUT_VERSION 7 - requires button/axes labeling
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index a26ca60..8402c85 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -126,6 +126,12 @@
 #include <string.h>
 #include <math.h>
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+#include <X11/Xatom.h>
+#include <xserver-properties.h>
+#endif
+
+
 static const char identification[] = "$Identification: 0 $";
 static InputDriverPtr aiptekDrv;
 static int debug_level = INI_DEBUG_LEVEL;
@@ -1499,6 +1505,9 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
      */
     InitValuatorAxisStruct(pDriver,                 /* X resolution */
                0,                                   /* axis_id */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+               XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X),
+#endif
                0,                                   /* min value */
                device->xBottom - device->xTop,      /* max value */
                LPI2CPM(375),                        /* resolution */
@@ -1507,6 +1516,9 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
 
     InitValuatorAxisStruct(pDriver,                 /* Y Resolution */
                1,                                   /* axis_id */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+               XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y),
+#endif
                0,                                   /* min value */
                device->yBottom - device->yTop,      /* max value */
                LPI2CPM(375),                        /* resolution */
@@ -1515,6 +1527,9 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
 
     InitValuatorAxisStruct(pDriver,                 /* Pressure */
                2,                                   /* axis_id */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+               XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE),
+#endif
                0,                                   /* min value */
                511,                                 /* max value */
                512,                                 /* resolution */
@@ -1523,6 +1538,9 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
 
     InitValuatorAxisStruct(pDriver,                 /* xTilt */
                3,                                   /* axis id */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+               XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_X),
+#endif
                -128,                                /* min value */
                127,                                 /* max value */
                256,                                 /* resolution */
@@ -1531,6 +1549,9 @@ xf86AiptekOpenDevice(DeviceIntPtr pDriver)
 
     InitValuatorAxisStruct(pDriver,                 /* yTilt */
                4,                                   /* axis_id */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+               XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_Y),
+#endif
                -128,                                /* min value */
                127,                                 /* max value */
                256,                                 /* resolution */
@@ -1554,11 +1575,15 @@ static int
 xf86AiptekProc(DeviceIntPtr pAiptek, int requestCode)
 {
     CARD8           map[512+1];
-    int             numAxes;
-    int             numButtons;
+    int             numAxes = 5; /* X, Y, Z, xTilt, yTilt */
+    int             numButtons = 5;
     int             loop;
     LocalDevicePtr  local  = (LocalDevicePtr)pAiptek->public.devicePrivate;
     AiptekDevicePtr device = (AiptekDevicePtr)PRIVATE(pAiptek);
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+    Atom            btn_labels[numAxes];
+    Atom            axes_labels[numButtons];
+#endif
 
     DBG(2, ErrorF("xf86AiptekProc() type=%s flags=%d request=%d\n",
               (DEVICE_ID(device->flags) == STYLUS_ID) ? "stylus" :
@@ -1570,15 +1595,27 @@ xf86AiptekProc(DeviceIntPtr pAiptek, int requestCode)
         case DEVICE_INIT:
         {
             DBG(1, ErrorF("xf86AiptekProc request=INIT\n"));
-            numAxes    = 5;            /* X, Y, Z, xTilt, yTilt */
-            numButtons = 5;
 
             for(loop=1; loop<=numButtons; ++loop)
             {
                 map[loop] = loop;
             }
 
-            if (InitButtonClassDeviceStruct(pAiptek,numButtons,map) == FALSE)
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+            btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
+            btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
+            btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
+            btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
+            btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
+
+            memset(axes_labels, 0, sizeof(axes_labels));
+#endif
+
+            if (InitButtonClassDeviceStruct(pAiptek,numButtons,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+                        btn_labels,
+#endif
+                        map) == FALSE)
             {
                 ErrorF("Unable to init Button Class Device\n");
                 return !Success;
@@ -1609,8 +1646,13 @@ xf86AiptekProc(DeviceIntPtr pAiptek, int requestCode)
                 return !Success;
             }
 
+            /* we don't label the axes here, done later in
+             * xf86AiptedOpenDevice */
             if (InitValuatorClassDeviceStruct(pAiptek,
                    numAxes,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+                   axes_labels,
+#endif
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
                    xf86GetMotionEvents,
 #endif


Reply to: