[clutter] x11/device-manager-xi2: Add 'Abs Distance' axis



commit f6da5ea616b114c80708817c51b20abb8f8a8304
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Mon Apr 9 11:56:26 2012 +0100

    x11/device-manager-xi2: Add 'Abs Distance' axis
    
    In XInput 2, the proximity events of XInput 1 have been replaced by an
    axis on a valuator class. This means that, on devices that support
    proximity information, for instance pens of a tablet, you will start
    receiving events with the distance as an axis value - similarly to how
    the pressure and tilt are presented in the API.

 clutter/x11/clutter-device-manager-xi2.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c
index 327f3b0..6a310e6 100644
--- a/clutter/x11/clutter-device-manager-xi2.c
+++ b/clutter/x11/clutter-device-manager-xi2.c
@@ -59,6 +59,7 @@ static const char *clutter_input_axis_atom_names[] = {
   "Abs Tilt X",         /* CLUTTER_INPUT_AXIS_XTILT */
   "Abs Tilt Y",         /* CLUTTER_INPUT_AXIS_YTILT */
   "Abs Wheel",          /* CLUTTER_INPUT_AXIS_WHEEL */
+  "Abs Distance",       /* CLUTTER_INPUT_AXIS_DISTANCE */
 };
 
 #define N_AXIS_ATOMS    G_N_ELEMENTS (clutter_input_axis_atom_names)
@@ -94,7 +95,7 @@ translate_valuator_class (Display             *xdisplay,
     }
 
   for (i = CLUTTER_INPUT_AXIS_IGNORE;
-       i <= CLUTTER_INPUT_AXIS_WHEEL;
+       i < CLUTTER_INPUT_AXIS_LAST;
        i += 1)
     {
       if (clutter_input_axis_atoms[i] == class->label)



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