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

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



 configure.ac |    2 +-
 src/evdev.c  |   43 +++++++++++++++++++++++++++++++++----------
 2 files changed, 34 insertions(+), 11 deletions(-)

New commits:
commit f7850a40424f7ec0c32fb2b46d427b51b5410d99
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 11 13:42:33 2009 +1000

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

diff --git a/configure.ac b/configure.ac
index 841558c..d2a3bc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-evdev],
-        2.3.1,
+        2.3.2,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-evdev)
 

commit bd4102af6e168c1b9129301f88e9601f8f5e0848
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Dec 1 15:44:39 2009 +1000

    Fix up BTN_TOUCH handling for non-button tablets.
    
    BTN_TOOL_* is treated as tool, just like before. BTN_TOUCH on the other hand
    may need to be treated as a button left press. This again requires a button
    class.
    
    Tested on an HP Touchsmart and a Wacom tablet.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 1b0df04abe329433658c95debdafdf1714173814)

diff --git a/src/evdev.c b/src/evdev.c
index 9470ea8..faab8f3 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -617,7 +617,6 @@ EvdevProcessKeyEvent(InputInfoPtr pInfo, struct input_event *ev)
             return;
 
     switch (ev->code) {
-        case BTN_TOUCH:
         case BTN_TOOL_PEN:
         case BTN_TOOL_RUBBER:
         case BTN_TOOL_BRUSH:
@@ -627,7 +626,11 @@ EvdevProcessKeyEvent(InputInfoPtr pInfo, struct input_event *ev)
         case BTN_TOOL_MOUSE:
         case BTN_TOOL_LENS:
             pEvdev->tool = value ? ev->code : 0;
-            if (!(pEvdev->flags & EVDEV_TOUCHSCREEN))
+            break;
+
+        case BTN_TOUCH:
+            pEvdev->tool = value ? ev->code : 0;
+            if (!(pEvdev->flags & (EVDEV_TOUCHSCREEN | EVDEV_TABLET)))
                 break;
             /* Treat BTN_TOUCH from devices that only have BTN_TOUCH as
              * BTN_LEFT. */
@@ -1929,6 +1932,11 @@ EvdevProbe(InputInfoPtr pInfo)
             {
                 xf86Msg(X_INFO, "%s: Found absolute tablet.\n", pInfo->name);
                 pEvdev->flags |= EVDEV_TABLET;
+                if (!pEvdev->num_buttons)
+                {
+                    pEvdev->num_buttons = 7; /* LMR + scroll wheels */
+                    pEvdev->flags |= EVDEV_BUTTON_EVENTS;
+                }
             } else if (TestBit(ABS_PRESSURE, pEvdev->abs_bitmask) ||
                 TestBit(BTN_TOUCH, pEvdev->key_bitmask)) {
                 if (num_buttons || TestBit(BTN_TOOL_FINGER, pEvdev->key_bitmask)) {

commit 22e816eb326a5495a5dc6e0a94394534d6645bae
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Dec 1 14:16:10 2009 +1000

    Only init the calibration property for absolute devices.
    
    Relative devices can't be calibrated anyway so why bother.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 2ca24a16f08095f35d5610f16e202c525b3075e9)

diff --git a/src/evdev.c b/src/evdev.c
index d37889d..9470ea8 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2522,7 +2522,7 @@ EvdevInitProperty(DeviceIntPtr dev)
             rc = XIChangeDeviceProperty(dev, prop_calibration, XA_INTEGER,
                     32, PropModeReplace, 4, calibration,
                     FALSE);
-        } else {
+        } else if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS) {
             rc = XIChangeDeviceProperty(dev, prop_calibration, XA_INTEGER,
                     32, PropModeReplace, 0, NULL,
                     FALSE);

commit b6b377fe9afa51ee8cbef8e9830537806e94a3ac
Author: David Woodhouse <dwmw2@infradead.org>
Date:   Tue Dec 1 00:14:54 2009 +0000

    Report initial calibration parameters.
    
    Where an initial calibration is provided through the Calibration option
    to the driver, it wasn't being exposed in the 'Evdev Axis Calibration'
    property. Remedy that...
    
    Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 7b285a802b8ccddd1edcf40ab345c4a96bcdf43c)

diff --git a/src/evdev.c b/src/evdev.c
index bf0e760..d37889d 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2511,8 +2511,22 @@ EvdevInitProperty(DeviceIntPtr dev)
 
         prop_calibration = MakeAtom(EVDEV_PROP_CALIBRATION,
                 strlen(EVDEV_PROP_CALIBRATION), TRUE);
-        rc = XIChangeDeviceProperty(dev, prop_calibration, XA_INTEGER, 32,
-                PropModeReplace, 0, NULL, FALSE);
+        if (pEvdev->flags & EVDEV_CALIBRATED) {
+            int calibration[4];
+
+            calibration[0] = pEvdev->calibration.min_x;
+            calibration[1] = pEvdev->calibration.max_x;
+            calibration[2] = pEvdev->calibration.min_y;
+            calibration[3] = pEvdev->calibration.max_y;
+
+            rc = XIChangeDeviceProperty(dev, prop_calibration, XA_INTEGER,
+                    32, PropModeReplace, 4, calibration,
+                    FALSE);
+        } else {
+            rc = XIChangeDeviceProperty(dev, prop_calibration, XA_INTEGER,
+                    32, PropModeReplace, 0, NULL,
+                    FALSE);
+        }
         if (rc != Success)
             return;
 

commit 3772676fd65065b43a94234127537ab5030b09f8
Author: David Woodhouse <dwmw2@infradead.org>
Date:   Tue Dec 1 00:12:36 2009 +0000

    Swap axes before applying touch screen calibration.
    
    When the SwapAxes option is set, the X and Y axes in calibration should
    be labelled as the user perceives them -- not as the kernel sends them.
    
    Currently, we apply the X-axis calibration to the X-axis of the input,
    and then do the axis swapping so we've actually applied the X-axis
    calibration to what the user sees as the Y-axis.
    
    This patch changes the order of the operations, so that the axes are
    swapped before the calibration is applied.
    
    Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit f187badb71554a73bf9ca30ce75c9d166e688f03)

diff --git a/src/evdev.c b/src/evdev.c
index 33e02ab..bf0e760 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -464,6 +464,13 @@ EvdevProcessValuators(InputInfoPtr pInfo, int v[MAX_VALUATORS], int *num_v,
      */
     else if (pEvdev->abs && pEvdev->tool) {
         memcpy(v, pEvdev->vals, sizeof(int) * pEvdev->num_vals);
+
+        if (pEvdev->swap_axes) {
+            int tmp = v[0];
+            v[0] = v[1];
+            v[1] = tmp;
+        }
+
         if (pEvdev->flags & EVDEV_CALIBRATED)
         {
             v[0] = xf86ScaleAxis(v[0],
@@ -476,12 +483,6 @@ EvdevProcessValuators(InputInfoPtr pInfo, int v[MAX_VALUATORS], int *num_v,
                     pEvdev->calibration.max_y, pEvdev->calibration.min_y);
         }
 
-        if (pEvdev->swap_axes) {
-            int tmp = v[0];
-            v[0] = v[1];
-            v[1] = tmp;
-        }
-
         if (pEvdev->invert_x)
             v[0] = (pEvdev->absinfo[ABS_X].maximum - v[0] +
                     pEvdev->absinfo[ABS_X].minimum);


Reply to: