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

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



 ChangeLog        |  374 +++++++++++++++++++++++++++++++++++++++
 configure.ac     |    2 
 debian/changelog |    6 
 src/evdev.c      |  518 +++++++++++++++++++++++++++++++++++--------------------
 src/evdev.h      |   11 -
 5 files changed, 723 insertions(+), 188 deletions(-)

New commits:
commit 759f9dbca9a4e17f496f36ee49744e6cbd53752f
Author: Cyril Brulebois <kibi@debian.org>
Date:   Mon Nov 22 15:51:02 2010 +0100

    Upload to experimental.

diff --git a/debian/changelog b/debian/changelog
index 30c2ab2..ac6bb30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-xserver-xorg-input-evdev (1:2.5.99.901-1) UNRELEASED; urgency=low
+xserver-xorg-input-evdev (1:2.5.99.901-1) experimental; urgency=low
 
   * New upstream release.
 
- -- Cyril Brulebois <kibi@debian.org>  Mon, 22 Nov 2010 15:45:20 +0100
+ -- Cyril Brulebois <kibi@debian.org>  Mon, 22 Nov 2010 15:50:51 +0100
 
 xserver-xorg-input-evdev (1:2.5.0-1) experimental; urgency=low
 

commit ff2b3d707a5ac2d7778b3ef360922ad5193aeea6
Author: Cyril Brulebois <kibi@debian.org>
Date:   Mon Nov 22 15:45:40 2010 +0100

    Update changelogs.

diff --git a/ChangeLog b/ChangeLog
index 0034341..8c8c06d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,314 @@
+commit 31ba99e9edd28ff81437e0167c5322b9f619c52a
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Nov 19 14:27:09 2010 +1000
+
+    evdev 2.5.99.901
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit a4aefca2ed52e675e6151a0fb0742a9e19565a41
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Oct 25 11:05:18 2010 +1000
+
+    Reshuffle to avoid the need for XI86_CONFIGURED.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
+
+commit 20d7a0a4aab64232712186811ae55c40d2b7d161
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Oct 25 10:38:21 2010 +1000
+
+    Input API 12 requires a valuator mode for each axis.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
+
+commit 5e26ba8641809addc63e783e1cefac0f8524b020
+Author: Nikolai Kondrashov <spbnick@gmail.com>
+Date:   Wed Oct 20 23:31:30 2010 +0400
+
+    Extend button mapping to full ranges
+    
+    Extend button code to number mapping to cover full BTN_MOUSE and BTN_MISC
+    ranges, including undefined codes.
+    
+    This extends mapping introduced with 0367e387 to the following:
+    
+            1       BTN_LEFT        BTN_0       BTN_TOUCH
+            2       BTN_MIDDLE      BTN_1       BTN_STYLUS
+            3       BTN_RIGHT       BTN_2       BTN_STYLUS2
+    
+            8       BTN_SIDE        BTN_3
+            9       BTN_EXTRA       BTN_4
+            10      BTN_FORWARD     BTN_5
+            11      BTN_BACK        BTN_6
+            12      BTN_TASK        BTN_7
+            13      0x118           BTN_8
+            14      0x119           BTN_9
+            15      0x11A           0x10A
+            16      0x11B           0x10B
+            17      0x11C           0x10C
+            18      0x11D           0x10D
+            19      0x11E           0x10E
+            20      0x11F           0x10F
+    
+    This should fix https://bugs.freedesktop.org/show_bug.cgi?id=30336
+    
+    Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 71dd18f72889ef6998a1bd699630da583dcb775a
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Oct 19 10:22:55 2010 +1000
+
+    Rename CountBits to EvdevCountBits.
+    
+    Avoid name collision with the server.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+
+commit c3e49f2b95d3e40f97d6bffdaf8a6c036093fa91
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Oct 20 10:33:39 2010 +1000
+
+    Use an array for the proximity bits.
+    
+    Instead of two lists that need to be kept in sync, just store the bits in an
+    array and run through them.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+
+commit b06d3ffdcdb14978201af5b24a7292ee73b65318
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Oct 20 10:20:26 2010 +1000
+
+    Rename abs/rel/prox to abs_queued/rel_queued/prox_queued.
+    
+    Mainly to avoid confusing between pEvdev->prox and pEvdev->proximity and to
+    better express what these fields are actually holding.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+
+commit 3646371eefae63678876f45daa0eea2ac522f2e2
+Author: Benjamin Tissoires <tissoire@cena.fr>
+Date:   Sat Oct 16 20:20:31 2010 +0200
+
+    Add the names of the valuators for the multitouch properties
+    
+    Thoses definitions have been included in the kernel and in the X server.
+    However, the evdev driver has not been updated accordingly.
+    
+    Without these definitions, the multitouch axes are not correctly labelled.
+    
+    Signed-off-by: Benjamin Tissoires <tissoire@cena.fr>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit b48f4c41c0d3386bba3e9d8fa3da91f18aae190b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Oct 11 09:33:28 2010 +1000
+
+    Add proximity support.
+    
+    When one of the tools comes into proximity, queue up a proximity event and
+    send it accordingly.
+    
+    Includes special handling for tablets that do not send axes with tools
+    (#29645)
+    
+    Some tablets send axis values, then EV_SYN, and in the next event the
+    BTN_TOOL_PEN/BTN_TOUCH, etc. For these tablets, the cursor doesn't move as
+    coordinates while not in proximity are ignored.
+    
+    Buffer coordinates received while out-of-proximity and if we get a proximity
+    event without other coordinates, re-use the last ones received.
+    
+    X.Org Bug 29645 <http://bugs.freedesktop.org/show_bug.cgi?id=29645>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
+    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
+
+commit 185ad42078a3bcb423b83e41ebeddbb7541fe26c
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 8 10:47:34 2010 +1000
+
+    Rename evdev->tool to evdev->proximity.
+    
+    evdev doesn't care about the actual tool used, only that it is used as an
+    indicator for proximity. Rename the field accordingly to make the code more
+    obvious to read.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
+
+commit 7282e3ac6c3b23cce927271fb9ca34b2acd36fd3
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 8 11:30:14 2010 +1000
+
+    When posting buttons, post absolute valuators if we have them.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
+
+commit c504852aa27239a57445ca1de013b5bfefa68276
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 8 11:29:11 2010 +1000
+
+    Fix valuator offset when posting absolute motion events.
+    
+    If first_v was not zero, the values passed to xf86PostMotionEventP were
+    wrong.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
+
+commit 4bbf9c9125db51394870c86413fe18a0c8ec7068
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 8 11:28:27 2010 +1000
+
+    Don't pass pointers around to first_v and num_v.
+    
+    We only use them as values, no need for the addresses.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
+
+commit 684426a9d2b4850ae80c824d4afe1e95875eee21
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 8 10:59:12 2010 +1000
+
+    De-duplicate event queue access.
+    
+    Factor out access to the next queue element in a static function to be
+    reused for button and key presses.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
+
+commit 9664e5a48723e7085fc3ece2aa13f8696f631a3d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Oct 6 10:58:17 2010 +1000
+
+    Remove refcnt initialization from InputDriverRec.
+    
+    Removed from the server with
+    commit 6130170e7e9b64c611ee942ec3455dd1a185193d
+    Author: Adam Jackson <ajax@redhat.com>
+    Date:   Sat Sep 18 06:41:35 2010 -0400
+    
+        xfree86: Remove unused refcounting from input drivers
+    
+    And given that it was unused, we don't need to ifdef it.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 0367e3871f02993b4ce04873d6e40df16fb0a202
+Author: Nikolai Kondrashov <spbnick@gmail.com>
+Date:   Thu Sep 2 18:09:13 2010 +0400
+
+    Clean up button code to number mapping
+    
+    Now BTN_MOUSE, BTN_MISC and BTN_DIGI button ranges are all mapped to the
+    same lower numbers including first three, corresponding to the LMR mouse
+    buttons. Like this:
+    
+        1       BTN_LEFT        BTN_0       BTN_TOUCH
+        2       BTN_MIDDLE      BTN_1       BTN_STYLUS
+        3       BTN_RIGHT       BTN_2       BTN_STYLUS2
+    
+        8       BTN_SIDE        BTN_3
+        9       BTN_EXTRA       BTN_4
+        10      BTN_FORWARD     BTN_5
+        11      BTN_BACK        BTN_6
+        12      BTN_TASK        BTN_7
+        13                      BTN_8
+        14                      BTN_9
+    
+    This streamlines the button mapping under the assumption that these ranges
+    don't generally appear in a single device simultaneously. If they do appear,
+    they will simply report overlapping button numbers.
+    
+    Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 617a09e298768d0a1d33cb6b367410455489e8b8
+Author: Nikolai Kondrashov <spbnick@gmail.com>
+Date:   Tue Sep 7 10:38:20 2010 +1000
+
+    Add BTN_TOUCH/STYLUS/STYLUS2 support.
+    
+    These three buttons are mapped into buttons 1/2/3, respectively.
+    Overlapping range with BTN_LEFT/MIDDLE/RIGHT, assuming that these
+    ranges don't generally appear in a single device simultaneously.
+    
+    Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit b83515485b739451b6cde29c7e6f5c900175eaf9
+Author: Tim Yamin <plasm@roo.me.uk>
+Date:   Tue Sep 7 10:31:02 2010 +1000
+
+    SwapAxes should rescale raw values when enabled
+    
+    Current implementation assumes that X & Y axes have the same min and max
+    values. If they don't, you'll end up with funny behaviour if SwapAxes is
+    turned on.
+    
+    Signed-off-by: Tim Yamin <plasm@roo.me.uk>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 009d442aa347cea15d07ceaec955a2f69f247364
+Merge: 10493de 4964c61
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Sep 1 13:04:29 2010 +1000
+
+    Merge branch 'input-api' of git://people.freedesktop.org/~whot/xf86-input-evdev
+
+commit 10493de96e905b831e14bd510f2af1b8da3d2be6
+Author: Nikolai Kondrashov <spbnick@gmail.com>
+Date:   Tue Aug 31 11:31:07 2010 +0400
+
+    Improve dumb tablet detection
+    
+    Improve dumb tablet detection by checking if BTN_STYLUS or BTN_STYLUS2
+    (first or second pen barrel button) is present when BTN_TOOL_PEN is not
+    found.
+    
+    This enables detection of tablets without explicit tool proximity reporting.
+    These include at least four UC-Logic tablet models: WP4030U, WP5540U,
+    WP8060U and PF1209, on which many Genius and Trust models are based.
+    
+    Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 829facd516d90f92187b78ccf6d921a1b1671990
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Aug 31 14:09:46 2010 +1000
+
+    Bump to 2.5.99.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit fbafe59420f128b6264feeb115bbcbc1c933f611
+Author: Nikolai Kondrashov <spbnick@gmail.com>
+Date:   Wed Aug 25 00:39:45 2010 +0400
+
+    Fix comments about BTN_TOOL_PEN.
+    
+    Fix incorrect usage of BTN_DIGI instead of BTN_TOOL_PEN in comments.
+    Fix forgotten pEvdev->digi reference.
+    
+    Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
 commit 990540fa1905b11403d5c25345c428c5bc9ed126
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Mon Aug 23 10:34:36 2010 +1000
@@ -71,6 +382,69 @@ Date:   Mon Aug 9 13:01:11 2010 +1000
     
     Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
 
+commit 4964c61f4b248e9eb16e8eadb5f5d0b6410b6b84
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Jul 22 11:32:08 2010 +1000
+
+    Return BadMatch for already configured devices.
+    
+    PreInit can now return different error codes. Return BadAlloc for alloc
+    failures and BadMatch if the device was already configured or the cache
+    comparison/probe failed.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 92e8dc49611398c8a9659b244645530cd26736fe
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Jul 22 10:57:02 2010 +1000
+
+    Use the new input API (changed PreInit function prototype).
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit e0e4b7d89b20ab9997a2eeb17dc7381ecafa31e3
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Jul 22 10:51:54 2010 +1000
+
+    Move private init down.
+    
+    No real change, preparation for new input API.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit d2c11d36a05e18936e39f7aa592c15b254aff1de
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Jul 22 10:51:12 2010 +1000
+
+    Use pInfo->options instead of dev->commonOptions.
+    
+    No real change, preparation for new input API.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 2f636402d882c775497e88c1f74477c4f6e9521d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Jul 22 10:40:01 2010 +1000
+
+    Add ifdefs for pre ABI 12 support.
+    
+    The server doesn't provide these defines anymore, define them here for
+    future use. To be purged whenever we drop support for the current server.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 3d3565c069558b9d1e8e0e86332415731b88b11d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Jul 22 10:38:58 2010 +1000
+
+    Remove usage of XI86_POINTER_CAPABLE and XI86_KEYBOARD_CAPABLE.
+    
+    XI86_KEYBOARD_CAPABLE was write-only, both in the driver and the server.
+    XI86_POINTER_CAPABLE was write-only in the server and can be emulated with
+    has_abs_axes and has_rel_axes.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
 commit 421585fda6ce67c209d43952109dda056ee40941
 Author: Alex Warg <alexander.warg@os.inf.tu-dresden.de>
 Date:   Wed Jun 30 10:33:46 2010 +1000
diff --git a/debian/changelog b/debian/changelog
index 8358d8f..30c2ab2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-evdev (1:2.5.99.901-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Cyril Brulebois <kibi@debian.org>  Mon, 22 Nov 2010 15:45:20 +0100
+
 xserver-xorg-input-evdev (1:2.5.0-1) experimental; urgency=low
 
   [ Robert Hooker ]

commit 31ba99e9edd28ff81437e0167c5322b9f619c52a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Nov 19 14:27:09 2010 +1000

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

diff --git a/configure.ac b/configure.ac
index 07cd64e..a0ff404 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],
+        [2.5.99.901],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-evdev])
 AC_CONFIG_SRCDIR([Makefile.am])

commit a4aefca2ed52e675e6151a0fb0742a9e19565a41
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Oct 25 11:05:18 2010 +1000

    Reshuffle to avoid the need for XI86_CONFIGURED.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>

diff --git a/src/evdev.c b/src/evdev.c
index 018843f..040cfdc 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -63,7 +63,6 @@
 
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
 /* removed from server, purge when dropping support for server 1.10 */
-#define XI86_CONFIGURED         0x02
 #define XI86_SEND_DRAG_EVENTS   0x08
 #endif
 
@@ -1916,6 +1915,7 @@ EvdevProbe(InputInfoPtr pInfo)
     int has_lmr; /* left middle right */
     int ignore_abs = 0, ignore_rel = 0;
     EvdevPtr pEvdev = pInfo->private;
+    int rc = 1;
 
     /* Trinary state for ignoring axes:
        - unset: do the normal thing.
@@ -2082,7 +2082,7 @@ EvdevProbe(InputInfoPtr pInfo)
     }
 
     if (has_rel_axes || has_abs_axes || num_buttons) {
-        pInfo->flags |= XI86_SEND_DRAG_EVENTS | XI86_CONFIGURED;
+        pInfo->flags |= XI86_SEND_DRAG_EVENTS;
 	if (pEvdev->flags & EVDEV_TOUCHPAD) {
 	    xf86Msg(X_INFO, "%s: Configuring as touchpad\n", pInfo->name);
 	    pInfo->type_name = XI_TOUCHPAD;
@@ -2096,29 +2096,29 @@ EvdevProbe(InputInfoPtr pInfo)
 	    xf86Msg(X_INFO, "%s: Configuring as mouse\n", pInfo->name);
 	    pInfo->type_name = XI_MOUSE;
 	}
+
+        rc = 0;
     }
 
     if (has_keys) {
         xf86Msg(X_INFO, "%s: Configuring as keyboard\n", pInfo->name);
-        pInfo->flags |= XI86_CONFIGURED;
         pInfo->type_name = XI_KEYBOARD;
+        rc = 0;
     }
 
-    if (has_scroll && (pInfo->flags & XI86_CONFIGURED) &&
-        (has_rel_axes || has_abs_axes))
+    if (has_scroll &&
+        (has_rel_axes || has_abs_axes || num_buttons || has_keys))
     {
         xf86Msg(X_INFO, "%s: Adding scrollwheel support\n", pInfo->name);
         pEvdev->flags |= EVDEV_BUTTON_EVENTS;
         pEvdev->flags |= EVDEV_RELATIVE_EVENTS;
     }
 
-    if ((pInfo->flags & XI86_CONFIGURED) == 0) {
+    if (rc)
         xf86Msg(X_WARNING, "%s: Don't know how to use device\n",
 		pInfo->name);
-        return 1;
-    }
 
-    return 0;
+    return rc;
 }
 
 static void
@@ -2214,7 +2214,11 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
     xf86ProcessCommonOptions(pInfo, pInfo->options);
 
     if (NewEvdevPreInit(drv, pInfo, flags) == Success)
+    {
+        pInfo->flags |= XI86_CONFIGURED;
         return pInfo;
+    }
+
 
     xf86DeleteInput(pInfo, 0);
     return NULL;

commit 20d7a0a4aab64232712186811ae55c40d2b7d161
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Oct 25 10:38:21 2010 +1000

    Input API 12 requires a valuator mode for each axis.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>

diff --git a/src/evdev.c b/src/evdev.c
index 32253a2..018843f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1333,7 +1333,11 @@ EvdevAddAbsClass(DeviceIntPtr device)
 #endif
                                    pEvdev->absinfo[axis].minimum,
                                    pEvdev->absinfo[axis].maximum,
-                                   resolution, 0, resolution);
+                                   resolution, 0, resolution
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+                                   , Absolute
+#endif
+                                   );
         xf86InitValuatorDefaults(device, axnum);
         pEvdev->old_vals[axnum] = -1;
     }
@@ -1449,7 +1453,11 @@ EvdevAddRelClass(DeviceIntPtr device)
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
                 atoms[axnum],
 #endif
-                -1, -1, 1, 0, 1);
+                -1, -1, 1, 0, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+                                   , Relative
+#endif
+                );
         xf86InitValuatorDefaults(device, axnum);
     }
 

commit 5e26ba8641809addc63e783e1cefac0f8524b020
Author: Nikolai Kondrashov <spbnick@gmail.com>
Date:   Wed Oct 20 23:31:30 2010 +0400

    Extend button mapping to full ranges
    
    Extend button code to number mapping to cover full BTN_MOUSE and BTN_MISC
    ranges, including undefined codes.
    
    This extends mapping introduced with 0367e387 to the following:
    
            1       BTN_LEFT        BTN_0       BTN_TOUCH
            2       BTN_MIDDLE      BTN_1       BTN_STYLUS
            3       BTN_RIGHT       BTN_2       BTN_STYLUS2
    
            8       BTN_SIDE        BTN_3
            9       BTN_EXTRA       BTN_4
            10      BTN_FORWARD     BTN_5
            11      BTN_BACK        BTN_6
            12      BTN_TASK        BTN_7
            13      0x118           BTN_8
            14      0x119           BTN_9
            15      0x11A           0x10A
            16      0x11B           0x10B
            17      0x11C           0x10C
            18      0x11D           0x10D
            19      0x11E           0x10E
            20      0x11F           0x10F
    
    This should fix https://bugs.freedesktop.org/show_bug.cgi?id=30336
    
    Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/evdev.c b/src/evdev.c
index 3c5fa89..32253a2 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2345,13 +2345,13 @@ EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code)
             return 2;
         case BTN_RIGHT:
             return 3;
-        case BTN_SIDE ... BTN_TASK:
+        case BTN_SIDE ... BTN_JOYSTICK - 1:
             return 8 + code - BTN_SIDE;
 
         /* Generic buttons */
         case BTN_0 ... BTN_2:
             return 1 + code - BTN_0;
-        case BTN_3 ... BTN_9:
+        case BTN_3 ... BTN_MOUSE - 1:
             return 8 + code - BTN_3;
 
         /* Tablet stylus buttons */

commit 71dd18f72889ef6998a1bd699630da583dcb775a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Oct 19 10:22:55 2010 +1000

    Rename CountBits to EvdevCountBits.
    
    Avoid name collision with the server.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>

diff --git a/src/evdev.c b/src/evdev.c
index 626bb43..3c5fa89 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -165,7 +165,7 @@ static int EvdevSwitchMode(ClientPtr client, DeviceIntPtr device, int mode)
     return Success;
 }
 
-static size_t CountBits(unsigned long *array, size_t nlongs)
+static size_t EvdevCountBits(unsigned long *array, size_t nlongs)
 {
     unsigned int i;
     size_t count = 0;
@@ -1280,7 +1280,7 @@ EvdevAddAbsClass(DeviceIntPtr device)
     if (!TestBit(EV_ABS, pEvdev->bitmask))
             return !Success;
 
-    num_axes = CountBits(pEvdev->abs_bitmask, NLONGS(ABS_MAX));
+    num_axes = EvdevCountBits(pEvdev->abs_bitmask, NLONGS(ABS_MAX));
     if (num_axes < 1)
         return !Success;
 
@@ -1387,7 +1387,7 @@ EvdevAddRelClass(DeviceIntPtr device)
     if (!TestBit(EV_REL, pEvdev->bitmask))
         return !Success;
 
-    num_axes = CountBits(pEvdev->rel_bitmask, NLONGS(REL_MAX));
+    num_axes = EvdevCountBits(pEvdev->rel_bitmask, NLONGS(REL_MAX));
     if (num_axes < 1)
         return !Success;
 

commit c3e49f2b95d3e40f97d6bffdaf8a6c036093fa91
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Oct 20 10:33:39 2010 +1000

    Use an array for the proximity bits.
    
    Instead of two lists that need to be kept in sync, just store the bits in an
    array and run through them.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/src/evdev.c b/src/evdev.c
index 0cf01ab..626bb43 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -95,6 +95,18 @@ static char *evdevDefaults[] = {
     NULL
 };
 
+/* Any of those triggers a proximity event */
+static int proximity_bits[] = {
+        BTN_TOOL_PEN,
+        BTN_TOOL_RUBBER,
+        BTN_TOOL_BRUSH,
+        BTN_TOOL_PENCIL,
+        BTN_TOOL_AIRBRUSH,
+        BTN_TOOL_FINGER,
+        BTN_TOOL_MOUSE,
+        BTN_TOOL_LENS,
+};
+
 static int EvdevOn(DeviceIntPtr);
 static int EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare);
 static void EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl);
@@ -646,7 +658,7 @@ EvdevProcessAbsoluteMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
 static void
 EvdevProcessKeyEvent(InputInfoPtr pInfo, struct input_event *ev)
 {
-    int value;
+    int value, i;
     EvdevPtr pEvdev = pInfo->private;
 
     /* Get the signed value, earlier kernels had this as unsigned */
@@ -657,19 +669,16 @@ EvdevProcessKeyEvent(InputInfoPtr pInfo, struct input_event *ev)
         if (value == 2)
             return;
 
-    switch (ev->code) {
-        /* keep this list in sync with InitProximityClassDeviceStruct */
-        case BTN_TOOL_PEN:
-        case BTN_TOOL_RUBBER:
-        case BTN_TOOL_BRUSH:
-        case BTN_TOOL_PENCIL:
-        case BTN_TOOL_AIRBRUSH:
-        case BTN_TOOL_FINGER:
-        case BTN_TOOL_MOUSE:
-        case BTN_TOOL_LENS:
+    for (i = 0; i < ArrayLength(proximity_bits); i++)
+    {
+        if (ev->code == proximity_bits[i])
+        {
             EvdevProcessProximityEvent(pInfo, ev);
-            break;
+            return;
+        }
+    }
 
+    switch (ev->code) {
         case BTN_TOUCH:
             if (!(pEvdev->flags & (EVDEV_TOUCHSCREEN | EVDEV_TABLET)))
                 break;
@@ -1331,16 +1340,14 @@ EvdevAddAbsClass(DeviceIntPtr device)
 
     free(atoms);
 
-    /* keep this list in sync with EvdevProcessKeyEvent */
-    if (TestBit(BTN_TOOL_PEN, pEvdev->key_bitmask) ||
-        TestBit(BTN_TOOL_RUBBER, pEvdev->key_bitmask) ||
-        TestBit(BTN_TOOL_BRUSH, pEvdev->key_bitmask) ||
-        TestBit(BTN_TOOL_PENCIL, pEvdev->key_bitmask) ||
-        TestBit(BTN_TOOL_AIRBRUSH, pEvdev->key_bitmask) ||
-        TestBit(BTN_TOOL_FINGER, pEvdev->key_bitmask) ||
-        TestBit(BTN_TOOL_MOUSE, pEvdev->key_bitmask) ||
-        TestBit(BTN_TOOL_LENS, pEvdev->key_bitmask))
-        InitProximityClassDeviceStruct(device);
+    for (i = 0; i < ArrayLength(proximity_bits); i++)
+    {
+        if (TestBit(proximity_bits[i], pEvdev->key_bitmask))
+        {
+            InitProximityClassDeviceStruct(device);
+            break;
+        }
+    }
 
     if (!InitPtrFeedbackClassDeviceStruct(device, EvdevPtrCtrlProc))
         return !Success;

commit b06d3ffdcdb14978201af5b24a7292ee73b65318
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Oct 20 10:20:26 2010 +1000

    Rename abs/rel/prox to abs_queued/rel_queued/prox_queued.
    
    Mainly to avoid confusing between pEvdev->prox and pEvdev->proximity and to
    better express what these fields are actually holding.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/src/evdev.c b/src/evdev.c
index 717c03c..0cf01ab 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -373,24 +373,24 @@ EvdevProcessValuators(InputInfoPtr pInfo, int v[MAX_VALUATORS], int *num_v,
     *num_v = *first_v = 0;
 
     /* convert to relative motion for touchpads */
-    if (pEvdev->abs && (pEvdev->flags & EVDEV_RELATIVE_MODE)) {
+    if (pEvdev->abs_queued && (pEvdev->flags & EVDEV_RELATIVE_MODE)) {
         if (pEvdev->proximity) {
             if (pEvdev->old_vals[0] != -1)
                 pEvdev->delta[REL_X] = pEvdev->vals[0] - pEvdev->old_vals[0];
             if (pEvdev->old_vals[1] != -1)
                 pEvdev->delta[REL_Y] = pEvdev->vals[1] - pEvdev->old_vals[1];
-            if (pEvdev->abs & ABS_X_VALUE)
+            if (pEvdev->abs_queued & ABS_X_VALUE)
                 pEvdev->old_vals[0] = pEvdev->vals[0];
-            if (pEvdev->abs & ABS_Y_VALUE)
+            if (pEvdev->abs_queued & ABS_Y_VALUE)
                 pEvdev->old_vals[1] = pEvdev->vals[1];
         } else {
             pEvdev->old_vals[0] = pEvdev->old_vals[1] = -1;
         }
-        pEvdev->abs = 0;
-        pEvdev->rel = 1;
+        pEvdev->abs_queued = 0;
+        pEvdev->rel_queued = 1;
     }
 
-    if (pEvdev->rel) {
+    if (pEvdev->rel_queued) {
         int first = REL_CNT, last = 0;
         int i;
 
@@ -429,7 +429,7 @@ EvdevProcessValuators(InputInfoPtr pInfo, int v[MAX_VALUATORS], int *num_v,
      * initialized to 1 so devices that doesn't use this scheme still
      * just works.
      */
-    else if (pEvdev->abs && pEvdev->proximity) {
+    else if (pEvdev->abs_queued && pEvdev->proximity) {
         memcpy(v, pEvdev->vals, sizeof(int) * pEvdev->num_vals);
 
         if (pEvdev->swap_axes) {
@@ -475,7 +475,7 @@ EvdevProcessProximityEvent(InputInfoPtr pInfo, struct input_event *ev)
 {
     EvdevPtr pEvdev = pInfo->private;
 
-    pEvdev->prox = 1;
+    pEvdev->prox_queued = 1;
 
     EvdevQueueProximityEvent(pInfo, ev->value);
 }
@@ -502,10 +502,10 @@ EvdevProcessProximityState(InputInfoPtr pInfo)
     int i;
 
     /* no proximity change in the queue */
-    if (!pEvdev->prox)
+    if (!pEvdev->prox_queued)
     {
-        if (pEvdev->abs && !pEvdev->proximity)
-            pEvdev->abs_prox = pEvdev->abs;
+        if (pEvdev->abs_queued && !pEvdev->proximity)
+            pEvdev->abs_prox = pEvdev->abs_queued;
         return 0;
     }
 
@@ -523,9 +523,9 @@ EvdevProcessProximityState(InputInfoPtr pInfo)
     {
         /* We're about to go into/out of proximity but have no abs events
          * within the EV_SYN. Use the last coordinates we have. */
-        if (!pEvdev->abs && pEvdev->abs_prox)
+        if (!pEvdev->abs_queued && pEvdev->abs_prox)
         {
-            pEvdev->abs = pEvdev->abs_prox;
+            pEvdev->abs_queued = pEvdev->abs_prox;
             pEvdev->abs_prox = 0;
         }
     }
@@ -603,7 +603,7 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
             if (EvdevWheelEmuFilterMotion(pInfo, ev))
                 return;
 
-            pEvdev->rel = 1;
+            pEvdev->rel_queued = 1;
             pEvdev->delta[ev->code] += value;
             break;
     }
@@ -633,11 +633,11 @@ EvdevProcessAbsoluteMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
 
     pEvdev->vals[pEvdev->axis_map[ev->code]] = value;
     if (ev->code == ABS_X)
-        pEvdev->abs |= ABS_X_VALUE;
+        pEvdev->abs_queued |= ABS_X_VALUE;
     else if (ev->code == ABS_Y)
-        pEvdev->abs |= ABS_Y_VALUE;
+        pEvdev->abs_queued |= ABS_Y_VALUE;
     else
-        pEvdev->abs |= ABS_VALUE;
+        pEvdev->abs_queued |= ABS_VALUE;
 }
 
 /**
@@ -693,7 +693,7 @@ EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v,
 {
     EvdevPtr pEvdev = pInfo->private;
 
-    if (pEvdev->rel) {
+    if (pEvdev->rel_queued) {
         xf86PostMotionEventP(pInfo->dev, FALSE, first_v, num_v, v + first_v);
     }
 }
@@ -716,7 +716,7 @@ EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int num_v, int first_v,
      * initialized to 1 so devices that don't use this scheme still
      * just work.
      */
-    if (pEvdev->abs && pEvdev->proximity) {
+    if (pEvdev->abs_queued && pEvdev->proximity) {
         xf86PostMotionEventP(pInfo->dev, TRUE, first_v, num_v, v + first_v);
     }
 }
@@ -728,7 +728,7 @@ EvdevPostProximityEvents(InputInfoPtr pInfo, int which, int num_v, int first_v,
     int i;
     EvdevPtr pEvdev = pInfo->private;
 
-    for (i = 0; pEvdev->prox && i < pEvdev->num_queue; i++) {
+    for (i = 0; pEvdev->prox_queued && i < pEvdev->num_queue; i++) {
         switch (pEvdev->queue[i].type) {
             case EV_QUEUE_KEY:
             case EV_QUEUE_BTN:
@@ -759,7 +759,7 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v,
             break;
         case EV_QUEUE_BTN:
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
-            if (pEvdev->abs && pEvdev->proximity) {
+            if (pEvdev->abs_queued && pEvdev->proximity) {
                 xf86PostButtonEventP(pInfo->dev, 1, pEvdev->queue[i].key,
                                      pEvdev->queue[i].val, first_v, num_v,
                                      v + first_v);
@@ -799,9 +799,9 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev)
     memset(pEvdev->delta, 0, sizeof(pEvdev->delta));
     memset(pEvdev->queue, 0, sizeof(pEvdev->queue));
     pEvdev->num_queue = 0;
-    pEvdev->abs = 0;
-    pEvdev->rel = 0;
-    pEvdev->prox = 0;
+    pEvdev->abs_queued = 0;
+    pEvdev->rel_queued = 0;
+    pEvdev->prox_queued = 0;
 
 }
 
diff --git a/src/evdev.h b/src/evdev.h
index af93d41..7c17ca4 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -132,7 +132,7 @@ typedef struct {
     BOOL invert_y;
 
     int delta[REL_CNT];
-    unsigned int abs, rel, prox;
+    unsigned int abs_queued, rel_queued, prox_queued;
     unsigned int abs_prox;  /* valuators posted while out of prox? */
 
     /* XKB stuff has to be per-device rather than per-driver */

commit 3646371eefae63678876f45daa0eea2ac522f2e2
Author: Benjamin Tissoires <tissoire@cena.fr>
Date:   Sat Oct 16 20:20:31 2010 +0200

    Add the names of the valuators for the multitouch properties
    
    Thoses definitions have been included in the kernel and in the X server.
    However, the evdev driver has not been updated accordingly.
    
    Without these definitions, the multitouch axes are not correctly labelled.
    
    Signed-off-by: Benjamin Tissoires <tissoire@cena.fr>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/evdev.c b/src/evdev.c
index ef54443..717c03c 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2397,6 +2397,35 @@ static char* abs_labels[] = {
     AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
     AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
     AXIS_LABEL_PROP_ABS_VOLUME          /* 0x20 */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */
+    AXIS_LABEL_PROP_ABS_MISC,           /* undefined */


Reply to: