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

xserver-xorg-input-evdev: Changes to 'ubuntu'



 ChangeLog                                                 |  529 +++++++++++
 configure.ac                                              |    2 
 debian/changelog                                          |   42 
 debian/control                                            |    4 
 debian/patches/100-fix-touchup-problem-on-touchpads.patch |   28 
 debian/patches/101-gestures.patch                         |  114 +-
 src/evdev.c                                               |  653 ++++++++------
 src/evdev.h                                               |   12 
 8 files changed, 1050 insertions(+), 334 deletions(-)

New commits:
commit c81924b390df08350c97a82a0f1c591c389bc41a
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Jan 28 13:07:46 2011 +1100

    Update changelog

diff --git a/debian/changelog b/debian/changelog
index cb76b51..00b93c3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ xserver-xorg-input-evdev (1:2.6.0-1ubuntu1) UNRELEASED; urgency=low
 
   [ Robert Hooker ]
   * Merge from Debian Experimental. Remaining Ubuntu changes:
-    - Set default input module to evdev for Apple Magic Mouse (LP: #637430)
+    - Set default input module to evdev for Apple Magic Mouse (LP 637430)
     - Add debian/local/60-magictrackpad.conf
     - Add gesture support
     - Add debian/patches/100-fix-touchup-problem-on-touchpads.patch and
@@ -10,11 +10,11 @@ xserver-xorg-input-evdev (1:2.6.0-1ubuntu1) UNRELEASED; urgency=low
     - debian/rules: add configure option to enable utouch-grail support
     - Replace xserver-xorg-input-gevdev as it was a temporary solution
     - Depend on newer utouch-grail for udebs and ABI changes
-  * Patches that need refreshing before upload:
-    - 100-fix-touchup-problem-on-touchpads.patch
-    - 101-gestures.patch     
 
   [ Christopher James Halse Rogers ]
+  * 100-fix-touchup-problem-on-touchpads.patch:
+  * 101-gestures.patch:
+    - Refresh for new upstream
 
  -- Christopher James Halse Rogers <raof@ubuntu.com>  Fri, 28 Jan 2011 10:54:01 +1100
 

commit de425f7a65e04d2a3c729446d810ec6d1d987dab
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Jan 28 12:13:31 2011 +1100

    Refresh gestures patch

diff --git a/debian/patches/101-gestures.patch b/debian/patches/101-gestures.patch
index b2efedd..be2cc0c 100644
--- a/debian/patches/101-gestures.patch
+++ b/debian/patches/101-gestures.patch
@@ -1,8 +1,10 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -67,6 +67,22 @@ AC_SUBST([sdkdir])
- # Checks for header files.
- AC_HEADER_STDC
+Index: xserver-xorg-input-evdev/configure.ac
+===================================================================
+--- xserver-xorg-input-evdev.orig/configure.ac	2011-01-28 12:20:11.311087001 +1100
++++ xserver-xorg-input-evdev/configure.ac	2011-01-28 12:20:13.601087001 +1100
+@@ -65,6 +65,22 @@
+ AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
+ AC_SUBST([sdkdir])
  
 +AC_ARG_ENABLE(utouch-grail, AS_HELP_STRING([--enable-grail], [Build with utouch-grail gesture support (default: auto)]), [GRAIL=$enableval], [GRAIL=auto])
 +PKG_CHECK_MODULES(GRAIL, utouch-grail, [have_grail=yes], [have_grail=no])
@@ -23,32 +25,34 @@
  DRIVER_NAME=evdev
  AC_SUBST([DRIVER_NAME])
  
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -27,13 +27,18 @@
- AM_CFLAGS = $(XORG_CFLAGS)
+Index: xserver-xorg-input-evdev/src/Makefile.am
+===================================================================
+--- xserver-xorg-input-evdev.orig/src/Makefile.am	2011-01-28 12:20:11.331087001 +1100
++++ xserver-xorg-input-evdev/src/Makefile.am	2011-01-28 12:20:13.601087001 +1100
+@@ -29,11 +29,18 @@
+ AM_CPPFLAGS =-I$(top_srcdir)/include
  
  @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
 -@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
-+@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version @GRAIL_LIBS@
++@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version 
  @DRIVER_NAME@_drv_ladir = @inputdir@
  
- INCLUDES=-I$(top_srcdir)/include/
- 
--@DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c \
--                               @DRIVER_NAME@.h \
++@DRIVER_NAME@_drv_la_LIBS = @GRAIL_LIBS@
++
 +if USE_GRAIL
 +GRAIL_SRC=evdev-grail.c evdev-grail.h
 +endif
 +
-+@DRIVER_NAME@_drv_la_SOURCES = evdev.c \
-+                               evdev.h \
-+                               $(GRAIL_SRC) \
+ @DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c \
+                                @DRIVER_NAME@.h \
++			       $(GRAIL_SRC) \
                                 emuMB.c \
                                 emuWheel.c \
                                 draglock.c
---- /dev/null
-+++ b/src/evdev-grail.c
+Index: xserver-xorg-input-evdev/src/evdev-grail.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ xserver-xorg-input-evdev/src/evdev-grail.c	2011-01-28 12:20:13.601087001 +1100
 @@ -0,0 +1,313 @@
 +/*
 + * Copyright © 2010 Canonical, Ltd.
@@ -363,8 +367,10 @@
 +        pEvdev->grail = NULL;
 +    }
 +}
---- /dev/null
-+++ b/src/evdev-grail.h
+Index: xserver-xorg-input-evdev/src/evdev-grail.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ xserver-xorg-input-evdev/src/evdev-grail.h	2011-01-28 12:20:13.601087001 +1100
 @@ -0,0 +1,9 @@
 +#ifndef EVDEV_GRAIL_H_
 +#define EVDEV_GRAIL_H_
@@ -375,11 +381,13 @@
 +extern void GrailClose(InputInfoPtr pInfo);
 +
 +#endif /* _EVDEV_GRAIL_H_ */
---- a/src/evdev.c
-+++ b/src/evdev.c
-@@ -78,6 +78,13 @@
+Index: xserver-xorg-input-evdev/src/evdev.c
+===================================================================
+--- xserver-xorg-input-evdev.orig/src/evdev.c	2011-01-28 12:20:11.361087001 +1100
++++ xserver-xorg-input-evdev/src/evdev.c	2011-01-28 12:22:16.411087001 +1100
+@@ -71,6 +71,13 @@
+ #define MAXDEVICES MAX_DEVICES
  #endif
- /* end compat */
  
 +#if USE_GRAIL
 +#include "evdev-grail.h"
@@ -390,8 +398,8 @@
 +
  #define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
  
- /* evdev flags */
-@@ -736,7 +743,7 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo
+ #define MIN_KEYCODE 8
+@@ -829,7 +836,7 @@
   * Process the events from the device; nothing is actually posted to the server
   * until an EV_SYN event is received.
   */
@@ -400,7 +408,15 @@
  EvdevProcessEvent(InputInfoPtr pInfo, struct input_event *ev)
  {
      switch (ev->type) {
-@@ -771,7 +778,12 @@ EvdevReadInput(InputInfoPtr pInfo)
+@@ -858,12 +865,20 @@
+ static void
+ EvdevReadInput(InputInfoPtr pInfo)
+ {
++#if USE_GRAIL
++    EvdevPtr pEvdev = pInfo->private;
++#endif
+     struct input_event ev[NUM_EVENTS];
+     int i, len = sizeof(ev);
  
      while (len == sizeof(ev))
      {
@@ -414,7 +430,7 @@
          if (len <= 0)
          {
              if (errno == ENODEV) /* May happen after resume */
-@@ -794,6 +806,11 @@ EvdevReadInput(InputInfoPtr pInfo)
+@@ -881,6 +896,11 @@
              break;
          }
  
@@ -426,25 +442,25 @@
          /* The kernel promises that we always only read a complete
           * event, so len != sizeof ev is an error. */
          if (len % sizeof(ev[0])) {
-@@ -1214,7 +1231,7 @@ EvdevAddAbsClass(DeviceIntPtr device)
+@@ -1305,7 +1325,7 @@
      memset(pEvdev->old_vals, -1, num_axes * sizeof(int));
-     atoms = xalloc(pEvdev->num_vals * sizeof(Atom));
+     atoms = malloc(pEvdev->num_vals * sizeof(Atom));
  
--    for (axis = ABS_X; axis <= ABS_MAX; axis++) {
-+    for (axis = ABS_X; axis <= ABS_MISC; axis++) {
+-    for (axis = ABS_X; i < MAX_VALUATORS && axis <= ABS_MAX; axis++) {
++    for (axis = ABS_X; i < MAX_VALUATORS && axis <= ABS_MISC; axis++) {
          pEvdev->axis_map[axis] = -1;
          if (!TestBit(axis, pEvdev->abs_bitmask))
              continue;
-@@ -1234,7 +1251,7 @@ EvdevAddAbsClass(DeviceIntPtr device)
-                                        GetMotionHistorySize(), Absolute))
+@@ -1328,7 +1348,7 @@
          return !Success;
+     }
  
 -    for (axis = ABS_X; axis <= ABS_MAX; axis++) {
 +    for (axis = ABS_X; axis <= ABS_MISC; axis++) {
          int axnum = pEvdev->axis_map[axis];
-         if (axnum == -1)
-             continue;
-@@ -1611,7 +1628,6 @@ EvdevOn(DeviceIntPtr device)
+         int resolution = 10000;
+ 
+@@ -1722,7 +1742,6 @@
      return Success;
  }
  
@@ -452,7 +468,7 @@
  static int
  EvdevProc(DeviceIntPtr device, int what)
  {
-@@ -1657,6 +1673,7 @@ EvdevProc(DeviceIntPtr device, int what)
+@@ -1761,6 +1780,7 @@
              close(pInfo->fd);
              pInfo->fd = -1;
          }
@@ -460,18 +476,20 @@
          EvdevRemoveDevice(pInfo);
          pEvdev->min_maj = 0;
  	break;
-@@ -1927,6 +1944,8 @@ EvdevProbe(InputInfoPtr pInfo)
-         xf86Msg(X_INFO, "%s: Found absolute axes\n", pInfo->name);
+@@ -1998,6 +2018,8 @@
+         xf86Msg(X_PROBED, "%s: Found absolute axes\n", pInfo->name);
          pEvdev->flags |= EVDEV_ABSOLUTE_EVENTS;
  
 +	GrailOpen(pInfo);
 +
          if ((TestBit(ABS_X, pEvdev->abs_bitmask) &&
               TestBit(ABS_Y, pEvdev->abs_bitmask))) {
-             xf86Msg(X_INFO, "%s: Found x and y absolute axes\n", pInfo->name);
---- a/src/evdev.h
-+++ b/src/evdev.h
-@@ -178,8 +178,14 @@ typedef struct {
+             xf86Msg(X_PROBED, "%s: Found x and y absolute axes\n", pInfo->name);
+Index: xserver-xorg-input-evdev/src/evdev.h
+===================================================================
+--- xserver-xorg-input-evdev.orig/src/evdev.h	2011-01-28 12:20:11.351087001 +1100
++++ xserver-xorg-input-evdev/src/evdev.h	2011-01-28 12:20:13.601087001 +1100
+@@ -196,8 +196,14 @@
      /* Event queue used to defer keyboard/button events until EV_SYN time. */
      int                     num_queue;
      EventQueueRec           queue[EVDEV_MAXQUEUE];
@@ -486,8 +504,10 @@
  /* Event posting functions */
  void EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value);
  void EvdevQueueButtonEvent(InputInfoPtr pInfo, int button, int value);
---- /dev/null
-+++ b/src/gestureproto.h
+Index: xserver-xorg-input-evdev/src/gestureproto.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ xserver-xorg-input-evdev/src/gestureproto.h	2011-01-28 12:20:13.601087001 +1100
 @@ -0,0 +1,132 @@
 +/*
 + * Copyright © 2010 Canonical, Ltd.

commit 279b4924479e2b92c94d9fbb5b4592280e25b934
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Jan 28 12:12:57 2011 +1100

    Refresh 100-fix-touchup-problem-on-touchpads

diff --git a/debian/patches/100-fix-touchup-problem-on-touchpads.patch b/debian/patches/100-fix-touchup-problem-on-touchpads.patch
index fc4e86d..d596618 100644
--- a/debian/patches/100-fix-touchup-problem-on-touchpads.patch
+++ b/debian/patches/100-fix-touchup-problem-on-touchpads.patch
@@ -1,26 +1,28 @@
 Fix touchup problem on touchpads
 
---- a/src/evdev.c
-+++ b/src/evdev.c
-@@ -406,7 +406,7 @@
+Index: xserver-xorg-input-evdev/src/evdev.c
+===================================================================
+--- xserver-xorg-input-evdev.orig/src/evdev.c	2011-01-28 10:53:25.000000000 +1100
++++ xserver-xorg-input-evdev/src/evdev.c	2011-01-28 12:04:51.761087000 +1100
+@@ -384,7 +384,7 @@
      *num_v = *first_v = 0;
  
      /* convert to relative motion for touchpads */
--    if (pEvdev->abs && (pEvdev->flags & EVDEV_TOUCHPAD)) {
-+    if (pEvdev->flags & EVDEV_TOUCHPAD) {
-         if (pEvdev->tool) { /* meaning, touch is active */
+-    if (pEvdev->abs_queued && (pEvdev->flags & EVDEV_RELATIVE_MODE)) {
++    if (pEvdev->flags & EVDEV_RELATIVE_MODE) {
+         if (pEvdev->in_proximity) {
              if (pEvdev->old_vals[0] != -1)
                  pEvdev->delta[REL_X] = pEvdev->vals[0] - pEvdev->old_vals[0];
-@@ -419,8 +419,10 @@
+@@ -397,8 +397,10 @@
          } else {
              pEvdev->old_vals[0] = pEvdev->old_vals[1] = -1;
          }
--        pEvdev->abs = 0;
--        pEvdev->rel = 1;
-+	if (pEvdev->abs) {
-+		pEvdev->abs = 0;
-+		pEvdev->rel = 1;
+-        pEvdev->abs_queued = 0;
+-        pEvdev->rel_queued = 1;
++	if (pEvdev->abs_queued) {
++	    pEvdev->abs_queued = 0;
++	    pEvdev->rel_queued = 1;
 +	}
      }
  
-     if (pEvdev->rel) {
+     if (pEvdev->rel_queued) {

commit c540445ca667d8eb87bc4ad34f9efc97cdacfa0d
Author: Christopher James Halse Rogers <raof@ubuntu.com>
Date:   Fri Jan 28 10:54:51 2011 +1100

    Update changelog for new debian merge

diff --git a/debian/changelog b/debian/changelog
index 6056c9f..cb76b51 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,23 @@
+xserver-xorg-input-evdev (1:2.6.0-1ubuntu1) UNRELEASED; urgency=low
+
+  [ Robert Hooker ]
+  * Merge from Debian Experimental. Remaining Ubuntu changes:
+    - Set default input module to evdev for Apple Magic Mouse (LP: #637430)
+    - Add debian/local/60-magictrackpad.conf
+    - Add gesture support
+    - Add debian/patches/100-fix-touchup-problem-on-touchpads.patch and
+      debian/patches/101-gestures.patch
+    - debian/rules: add configure option to enable utouch-grail support
+    - Replace xserver-xorg-input-gevdev as it was a temporary solution
+    - Depend on newer utouch-grail for udebs and ABI changes
+  * Patches that need refreshing before upload:
+    - 100-fix-touchup-problem-on-touchpads.patch
+    - 101-gestures.patch     
+
+  [ Christopher James Halse Rogers ]
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com>  Fri, 28 Jan 2011 10:54:01 +1100
+
 xserver-xorg-input-evdev (1:2.6.0-1) experimental; urgency=low
 
   * New upstream release.
@@ -25,23 +45,6 @@ xserver-xorg-input-evdev (1:2.5.99.901-1) experimental; urgency=low
 
  -- Cyril Brulebois <kibi@debian.org>  Mon, 22 Nov 2010 15:50:51 +0100
 
-xserver-xorg-input-evdev (1:2.5.0-1ubuntu1) UNRELEASED; urgency=low
-
-  * Merge from Debian Experimental. Remaining Ubuntu changes:
-    - Set default input module to evdev for Apple Magic Mouse (LP: #637430)
-    - Add debian/local/60-magictrackpad.conf
-    - Add gesture support
-    - Add debian/patches/100-fix-touchup-problem-on-touchpads.patch and
-      debian/patches/101-gestures.patch
-    - debian/rules: add configure option to enable utouch-grail support
-    - Replace xserver-xorg-input-gevdev as it was a temporary solution
-    - Depend on newer utouch-grail for udebs and ABI changes
-  * Patches that need refreshing before upload:
-    - 100-fix-touchup-problem-on-touchpads.patch
-    - 101-gestures.patch     
-
- -- Robert Hooker <sarvatt@ubuntu.com>  Tue, 02 Nov 2010 16:22:45 -0400
-
 xserver-xorg-input-evdev (1:2.5.0-1) experimental; urgency=low
 
   [ Robert Hooker ]

commit 2878df8527e08fe5906703f8611a3b82ceb0f67d
Author: Cyril Brulebois <kibi@debian.org>
Date:   Tue Jan 11 15:40:06 2011 +0100

    Upload to experimental.

diff --git a/debian/changelog b/debian/changelog
index c77f6c4..14a1c65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-xserver-xorg-input-evdev (1:2.6.0-1) UNRELEASED; urgency=low
+xserver-xorg-input-evdev (1:2.6.0-1) experimental; urgency=low
 
   * New upstream release.
 
- -- Cyril Brulebois <kibi@debian.org>  Tue, 11 Jan 2011 15:39:46 +0100
+ -- Cyril Brulebois <kibi@debian.org>  Tue, 11 Jan 2011 15:40:01 +0100
 
 xserver-xorg-input-evdev (1:2.5.99.903-1) experimental; urgency=low
 

commit 0fd6b8582f7481f7d180662dfbc4cc168ff3a8f6
Author: Cyril Brulebois <kibi@debian.org>
Date:   Tue Jan 11 15:39:59 2011 +0100

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 64e90f2..3c729ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+commit 30c3645e20e945b0f8b7dc624748948464be606e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Jan 11 12:46:40 2011 +1000
+
+    evdev 2.6.0
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 3b52fe2ea4a934a8d87aacd185593beb01f8f273
+Author: Chase Douglas <chase.douglas@canonical.com>
+Date:   Wed Jan 5 10:09:55 2011 -0500
+
+    Print out error messages when failing to init devices
+    
+    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
 commit 540a4cce9071fce183c941ded35e7e8fb8f3507e
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Jan 5 09:04:56 2011 +1000
diff --git a/debian/changelog b/debian/changelog
index 09791bf..c77f6c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-evdev (1:2.6.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Cyril Brulebois <kibi@debian.org>  Tue, 11 Jan 2011 15:39:46 +0100
+
 xserver-xorg-input-evdev (1:2.5.99.903-1) experimental; urgency=low
 
   * New upstream release candidate.

commit 30c3645e20e945b0f8b7dc624748948464be606e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jan 11 12:46:40 2011 +1000

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

diff --git a/configure.ac b/configure.ac
index 44d5976..887021c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-evdev],
-        [2.5.99.903],
+        [2.6.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-evdev])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 3b52fe2ea4a934a8d87aacd185593beb01f8f273
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Jan 5 10:09:55 2011 -0500

    Print out error messages when failing to init devices
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/evdev.c b/src/evdev.c
index d47b6c2..45873c1 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1320,8 +1320,11 @@ EvdevAddAbsClass(DeviceIntPtr device)
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
                                        GetMotionHistory,
 #endif
-                                       GetMotionHistorySize(), Absolute))
+                                       GetMotionHistorySize(), Absolute)) {
+        xf86Msg(X_ERROR, "%s: failed to initialize valuator class device.\n",
+                device->name);
         return !Success;
+    }
 
     for (axis = ABS_X; axis <= ABS_MAX; axis++) {
         int axnum = pEvdev->axis_map[axis];
@@ -1365,8 +1368,11 @@ EvdevAddAbsClass(DeviceIntPtr device)
         }
     }
 
-    if (!InitPtrFeedbackClassDeviceStruct(device, EvdevPtrCtrlProc))
+    if (!InitPtrFeedbackClassDeviceStruct(device, EvdevPtrCtrlProc)) {
+        xf86Msg(X_ERROR, "%s: failed to initialize pointer feedback class "
+                "device.\n", device->name);
         return !Success;
+    }
 
     if (pEvdev->flags & EVDEV_TOUCHPAD)
         pEvdev->flags |= EVDEV_RELATIVE_MODE;
@@ -1449,11 +1455,17 @@ EvdevAddRelClass(DeviceIntPtr device)
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
                                        GetMotionHistory,
 #endif
-                                       GetMotionHistorySize(), Relative))
+                                       GetMotionHistorySize(), Relative)) {
+        xf86Msg(X_ERROR, "%s: failed to initialize valuator class device.\n",
+                device->name);
         return !Success;
+    }
 
-    if (!InitPtrFeedbackClassDeviceStruct(device, EvdevPtrCtrlProc))
+    if (!InitPtrFeedbackClassDeviceStruct(device, EvdevPtrCtrlProc)) {
+        xf86Msg(X_ERROR, "%s: failed to initialize pointer feedback class "
+                "device.\n", device->name);
         return !Success;
+    }
 
     for (axis = REL_X; axis <= REL_MAX; axis++)
     {

commit 80e24db12778bdf41d3af92fc9b0247e4c458dc1
Author: Cyril Brulebois <kibi@debian.org>
Date:   Wed Jan 5 01:33:47 2011 +0100

    Upload to experimental.

diff --git a/debian/changelog b/debian/changelog
index 5d26cbd..09791bf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-xserver-xorg-input-evdev (1:2.5.99.903-1) UNRELEASED; urgency=low
+xserver-xorg-input-evdev (1:2.5.99.903-1) experimental; urgency=low
 
   * New upstream release candidate.
 
- -- Cyril Brulebois <kibi@debian.org>  Wed, 05 Jan 2011 01:30:00 +0100
+ -- Cyril Brulebois <kibi@debian.org>  Wed, 05 Jan 2011 01:33:36 +0100
 
 xserver-xorg-input-evdev (1:2.5.99.901-2) experimental; urgency=low
 

commit 44e94bbc201e3f71d25966bd720eafbfe6067eb2
Author: Cyril Brulebois <kibi@debian.org>
Date:   Wed Jan 5 01:30:50 2011 +0100

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 8c8c06d..64e90f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,141 @@
+commit 540a4cce9071fce183c941ded35e7e8fb8f3507e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Jan 5 09:04:56 2011 +1000
+
+    evdev 2.5.99.903
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit bed25600f66db245b895a48d6edca30568ca7559
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Dec 23 12:13:16 2010 +1000
+
+    Don't update first_val and num_val if we don't have data (#32480)
+    
+    For touchpads, rel_queued may be on (due to abs to rel conversion) but the
+    delta for x/y is 0/0 on the first touch. Hence, we don't have any valuators
+    to post. The current results in a num_vals of -15 and a subsequent segfault
+    when the data is posted to the server.
+    
+    Start with a last valuator of -1, so that we know if we have at least one to
+    post.
+    
+    X.Org Bug 32480 <http://bugs.freedesktop.org/show_bug.cgi?id=32480>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit 9aea1c5fa09c25ad83bcf2fd4ee4bd853d889e5e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 21 10:53:06 2010 +1000
+
+    Add use_proximity bit for BTN_TOOL handling.
+    
+    Touchpads send garbage data between BTN_TOOL_FINGER and BTN_TOUCH. This
+    leads to cursor movement towards invalid positions (bottom left corner,
+    usually).
+    
+    Add a new flag "use_proximity" as a delimiter for BTN_TOUCH handling. If
+    unset, the actual proximity bits are ignored, no proximity events are sent
+    and BTN_TOUCH is used for the tool handling.
+    
+    Example event stream for synaptics:
+    
+    Event: time 1292893041.002731, -------------- Report Sync ------------
+    Event: time 1292893041.015807, type 1 (Key), code 330 (Touch), value 0
+    Event: time 1292893041.015812, type 3 (Absolute), code 0 (X), value 4283
+    Event: time 1292893041.015813, type 3 (Absolute), code 1 (Y), value 4860
+    Event: time 1292893041.015815, type 3 (Absolute), code 24 (Pressure), value 23
+    Event: time 1292893041.015817, type 3 (Absolute), code 28 (Tool Width), value 5
+    Event: time 1292893041.027537, -------------- Report Sync ------------
+    Event: time 1292893041.038854, type 3 (Absolute), code 0 (X), value 1
+    Event: time 1292893041.038857, type 3 (Absolute), code 1 (Y), value 5855
+    Event: time 1292893041.038859, type 3 (Absolute), code 24 (Pressure), value 1
+    Event: time 1292893041.038861, type 3 (Absolute), code 28 (Tool Width), value 5
+    Event: time 1292893041.038864, -------------- Report Sync ------------
+    Event: time 1292893041.062432, type 3 (Absolute), code 24 (Pressure), value 0
+    Event: time 1292893041.062435, type 3 (Absolute), code 28 (Tool Width), value 0
+    Event: time 1292893041.062437, type 1 (Key), code 325 (ToolFinger), value 0
+    Event: time 1292893041.062438, -------------- Report Sync ------------
+    
+    Reported-by: Dave Airlie <airlied@redhat.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
+
+commit 0c987a929dd4c98d4a80d8b7f75286902eb572f2
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 21 10:45:11 2010 +1000
+
+    Revert "Don't count BTN_TOUCH as tool. (#29428)"
+    
+    Synaptics devices send garbage between BTN_TOUCH and BTN_TOOL_FINGER. By
+    switching to use this as proximity data now, the pointer is reset to the
+    garbage data position (usually around 1/5855).
+    
+    This reverts commit 899218e18120918138f6d7420465763422d5b3b7.
+    
+    Reported-by: Dave Airlie <airlied@redhat.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
+
+commit 242a01eb0f2f9b56fb6d6f0b41fc6a899cadb857
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 21 10:40:45 2010 +1000
+
+    Rename proximity to in_proximity.
+    
+    No functional change, just making it a bit more obvious to read.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
+    Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
+
+commit 7415953b9afac3221d1bb834aadcc7c1917366fd
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 21 10:44:14 2010 +1000
+
+    Fix grammar typo in comment.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 1ced7ec7e23c57c0e1aaddeb3c113e67a5cb7341
+Author: Peter Korsgaard <jacmet@sunsite.dk>
+Date:   Fri Dec 10 16:16:59 2010 +0100
+
+    evdev: rename EvdevCacheCompare() to EvdevCache()
+    
+    Since 59056e656c64 (Remove the reopen timer logic) from last year,
+    EvdevCacheCompare() is only used for caching ioctl values and not for
+    comparing, so remove the unused compare logic and rename the function
+    to EvdevCache().
+    
+    Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+    Reviewed-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 1c5ad6f8a0f098da89aa88102f424c667addf376
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Dec 8 12:40:49 2010 +1000
+
+    evdev 2.5.99.902
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 6fd1d0860e71c644fa72b4b40872e0ced671726c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Dec 6 11:41:11 2010 +1000
+
+    Return error codes from EvdevOpenDevice()
+    
+    The server's behaviour is to stop adding new devices when a BadAlloc occurs
+    on any device (on the assumption that new devices won't magically have more
+    memory). Change EvdevOpenDevice() to return an error code of BadValue when
+    it fails (and thus to the server) to prevent other devices being ignored
+    because of one misconfigured one.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+
 commit 31ba99e9edd28ff81437e0167c5322b9f619c52a
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Fri Nov 19 14:27:09 2010 +1000
diff --git a/debian/changelog b/debian/changelog
index 211f4fd..5d26cbd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-evdev (1:2.5.99.903-1) UNRELEASED; urgency=low
+
+  * New upstream release candidate.
+
+ -- Cyril Brulebois <kibi@debian.org>  Wed, 05 Jan 2011 01:30:00 +0100
+
 xserver-xorg-input-evdev (1:2.5.99.901-2) experimental; urgency=low
 
   * Switch Architecture for all binary packages from any to linux-any

commit 540a4cce9071fce183c941ded35e7e8fb8f3507e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Jan 5 09:04:56 2011 +1000

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

diff --git a/configure.ac b/configure.ac
index 7b75618..44d5976 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-evdev],
-        [2.5.99.902],
+        [2.5.99.903],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-evdev])
 AC_CONFIG_SRCDIR([Makefile.am])

commit c6c52d038bd641316197bde2a481378014fcc0c0
Author: Cyril Brulebois <kibi@debian.org>
Date:   Tue Jan 4 16:06:59 2011 +0100

    Upload to experimental.

diff --git a/debian/changelog b/debian/changelog
index 61b29e4..211f4fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-xserver-xorg-input-evdev (1:2.5.99.901-2) UNRELEASED; urgency=low
+xserver-xorg-input-evdev (1:2.5.99.901-2) experimental; urgency=low
 
   * Switch Architecture for all binary packages from any to linux-any
     since this driver is Linux-only.
   * Cherry-pick bed25600 from upstream to fix crashes in
     GetProximityEvents (Closes: #605374).
 
- -- Cyril Brulebois <kibi@debian.org>  Fri, 03 Dec 2010 19:19:49 +0100
+ -- Cyril Brulebois <kibi@debian.org>  Tue, 04 Jan 2011 16:06:52 +0100
 
 xserver-xorg-input-evdev (1:2.5.99.901-1) experimental; urgency=low
 

commit e5479f812ee51a76462b07164f461464dc79efcc
Author: Cyril Brulebois <kibi@debian.org>
Date:   Tue Jan 4 16:06:46 2011 +0100

    Add bug closure for #605374.

diff --git a/debian/changelog b/debian/changelog
index 78cf3b0..61b29e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,7 +3,7 @@ xserver-xorg-input-evdev (1:2.5.99.901-2) UNRELEASED; urgency=low
   * Switch Architecture for all binary packages from any to linux-any
     since this driver is Linux-only.
   * Cherry-pick bed25600 from upstream to fix crashes in
-    GetProximityEvents.
+    GetProximityEvents (Closes: #605374).
 
  -- Cyril Brulebois <kibi@debian.org>  Fri, 03 Dec 2010 19:19:49 +0100
 

commit 482fb728577672742d1e7d6e3ffe4235336ab9f3
Author: Cyril Brulebois <kibi@debian.org>
Date:   Tue Jan 4 15:59:01 2011 +0100

    Document the cherry-pick.

diff --git a/debian/changelog b/debian/changelog
index 029f19f..78cf3b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ xserver-xorg-input-evdev (1:2.5.99.901-2) UNRELEASED; urgency=low
 
   * Switch Architecture for all binary packages from any to linux-any
     since this driver is Linux-only.
+  * Cherry-pick bed25600 from upstream to fix crashes in
+    GetProximityEvents.
 
  -- Cyril Brulebois <kibi@debian.org>  Fri, 03 Dec 2010 19:19:49 +0100
 

commit 3e98473acdc9caf63c604a96b3173ada748b4703
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 23 12:13:16 2010 +1000

    Don't update first_val and num_val if we don't have data (#32480)
    
    For touchpads, rel_queued may be on (due to abs to rel conversion) but the
    delta for x/y is 0/0 on the first touch. Hence, we don't have any valuators
    to post. The current results in a num_vals of -15 and a subsequent segfault
    when the data is posted to the server.
    
    Start with a last valuator of -1, so that we know if we have at least one to
    post.
    
    X.Org Bug 32480 <http://bugs.freedesktop.org/show_bug.cgi?id=32480>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit bed25600f66db245b895a48d6edca30568ca7559)
    
    Signed-off-by: Cyril Brulebois <kibi@debian.org>

diff --git a/src/evdev.c b/src/evdev.c
index 040cfdc..c005f9f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -402,7 +402,7 @@ EvdevProcessValuators(InputInfoPtr pInfo, int v[MAX_VALUATORS], int *num_v,
     }
 
     if (pEvdev->rel_queued) {
-        int first = REL_CNT, last = 0;
+        int first = REL_CNT, last = -1;
         int i;
 
         if (pEvdev->swap_axes) {
@@ -428,8 +428,11 @@ EvdevProcessValuators(InputInfoPtr pInfo, int v[MAX_VALUATORS], int *num_v,
             }
         }
 
-        *num_v = (last - first + 1);
-        *first_v = first;
+        if (last >= 0)
+        {
+            *num_v = (last - first + 1);
+            *first_v = first;
+        }
     }
     /*
      * Some devices only generate valid abs coords when BTN_TOOL_PEN is

commit bed25600f66db245b895a48d6edca30568ca7559
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 23 12:13:16 2010 +1000

    Don't update first_val and num_val if we don't have data (#32480)
    
    For touchpads, rel_queued may be on (due to abs to rel conversion) but the
    delta for x/y is 0/0 on the first touch. Hence, we don't have any valuators
    to post. The current results in a num_vals of -15 and a subsequent segfault
    when the data is posted to the server.
    
    Start with a last valuator of -1, so that we know if we have at least one to
    post.
    
    X.Org Bug 32480 <http://bugs.freedesktop.org/show_bug.cgi?id=32480>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>

diff --git a/src/evdev.c b/src/evdev.c
index 50847a8..d47b6c2 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -402,7 +402,7 @@ EvdevProcessValuators(InputInfoPtr pInfo, int v[MAX_VALUATORS], int *num_v,
     }
 
     if (pEvdev->rel_queued) {
-        int first = REL_CNT, last = 0;
+        int first = REL_CNT, last = -1;
         int i;
 
         if (pEvdev->swap_axes) {
@@ -428,8 +428,11 @@ EvdevProcessValuators(InputInfoPtr pInfo, int v[MAX_VALUATORS], int *num_v,
             }
         }
 
-        *num_v = (last - first + 1);
-        *first_v = first;
+        if (last >= 0)
+        {
+            *num_v = (last - first + 1);
+            *first_v = first;
+        }
     }
     /*
      * Some devices only generate valid abs coords when BTN_TOOL_PEN is

commit 9aea1c5fa09c25ad83bcf2fd4ee4bd853d889e5e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Dec 21 10:53:06 2010 +1000

    Add use_proximity bit for BTN_TOOL handling.
    
    Touchpads send garbage data between BTN_TOOL_FINGER and BTN_TOUCH. This
    leads to cursor movement towards invalid positions (bottom left corner,
    usually).
    
    Add a new flag "use_proximity" as a delimiter for BTN_TOUCH handling. If
    unset, the actual proximity bits are ignored, no proximity events are sent
    and BTN_TOUCH is used for the tool handling.
    
    Example event stream for synaptics:
    
    Event: time 1292893041.002731, -------------- Report Sync ------------
    Event: time 1292893041.015807, type 1 (Key), code 330 (Touch), value 0
    Event: time 1292893041.015812, type 3 (Absolute), code 0 (X), value 4283
    Event: time 1292893041.015813, type 3 (Absolute), code 1 (Y), value 4860
    Event: time 1292893041.015815, type 3 (Absolute), code 24 (Pressure), value 23
    Event: time 1292893041.015817, type 3 (Absolute), code 28 (Tool Width), value 5
    Event: time 1292893041.027537, -------------- Report Sync ------------
    Event: time 1292893041.038854, type 3 (Absolute), code 0 (X), value 1
    Event: time 1292893041.038857, type 3 (Absolute), code 1 (Y), value 5855
    Event: time 1292893041.038859, type 3 (Absolute), code 24 (Pressure), value 1
    Event: time 1292893041.038861, type 3 (Absolute), code 28 (Tool Width), value 5
    Event: time 1292893041.038864, -------------- Report Sync ------------
    Event: time 1292893041.062432, type 3 (Absolute), code 24 (Pressure), value 0
    Event: time 1292893041.062435, type 3 (Absolute), code 28 (Tool Width), value 0
    Event: time 1292893041.062437, type 1 (Key), code 325 (ToolFinger), value 0
    Event: time 1292893041.062438, -------------- Report Sync ------------
    
    Reported-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>

diff --git a/src/evdev.c b/src/evdev.c
index b6591ce..50847a8 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -486,6 +486,9 @@ EvdevProcessProximityEvent(InputInfoPtr pInfo, struct input_event *ev)
 {
     EvdevPtr pEvdev = pInfo->private;
 
+    if (!pEvdev->use_proximity)
+        return;
+
     pEvdev->prox_queued = 1;
 
     EvdevQueueProximityEvent(pInfo, ev->value);
@@ -679,7 +682,10 @@ EvdevProcessKeyEvent(InputInfoPtr pInfo, struct input_event *ev)
 
     switch (ev->code) {
         case BTN_TOUCH:
-            pEvdev->in_proximity = value ? ev->code : 0;
+            /* For devices that have but don't use proximity, use
+             * BTN_TOUCH as the proximity notifier */
+            if (!pEvdev->use_proximity)
+                pEvdev->in_proximity = value ? ev->code : 0;
             if (!(pEvdev->flags & (EVDEV_TOUCHSCREEN | EVDEV_TABLET)))
                 break;
             /* Treat BTN_TOUCH from devices that only have BTN_TOUCH as
@@ -1346,6 +1352,9 @@ EvdevAddAbsClass(DeviceIntPtr device)
 
     for (i = 0; i < ArrayLength(proximity_bits); i++)
     {
+        if (!pEvdev->use_proximity)
+            break;
+
         if (TestBit(proximity_bits[i], pEvdev->key_bitmask))
         {
             InitProximityClassDeviceStruct(device);
@@ -2039,6 +2048,7 @@ EvdevProbe(InputInfoPtr pInfo)
 	if (pEvdev->flags & EVDEV_TOUCHPAD) {
 	    xf86Msg(X_INFO, "%s: Configuring as touchpad\n", pInfo->name);
 	    pInfo->type_name = XI_TOUCHPAD;
+	    pEvdev->use_proximity = 0;
 	} else if (pEvdev->flags & EVDEV_TABLET) {
 	    xf86Msg(X_INFO, "%s: Configuring as tablet\n", pInfo->name);
 	    pInfo->type_name = XI_TABLET;
@@ -2205,6 +2215,7 @@ EvdevPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
      * proximity will still report events.
      */
     pEvdev->in_proximity = 1;
+    pEvdev->use_proximity = 1;
 
     /* Grabbing the event device stops in-kernel event forwarding. In other
        words, it disables rfkill and the "Macintosh mouse button emulation".
diff --git a/src/evdev.h b/src/evdev.h
index b04f961..f640fdd 100644


Reply to: