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

2017-01-18 Thread Andreas Boll
 configure.ac   |2 -
 include/evdev-properties.h |2 +
 man/evdev.man  |8 +++
 src/emuMB.c|   47 +++--
 src/evdev.c|9 +++-
 src/evdev.h|1 
 6 files changed, 61 insertions(+), 8 deletions(-)

New commits:
commit 1dd6adea1d137877ca1a9642e1552a152355
Author: Peter Hutterer 
Date:   Wed Jan 18 13:14:29 2017 +1000

evdev 2.10.5

Signed-off-by: Peter Hutterer 

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

commit 231061d004ee4e924bb736adc428287367d2001c
Author: Alexander Volkov 
Date:   Mon Dec 26 17:39:32 2016 +0300

Don't send pointer events in addition to touch events

Updating abs_vals for touch events since 
d24431a1863c49aa9edcabf535ffa64bfa87053c
leads to posting Motion events with updated coordinates to the X server,
which in turn resends them to clients.

Don't queue Motion events for touch events, the X server should
synthesize them itself.

Signed-off-by: Alexander Volkov 
Reviewed-by: Peter Hutterer 
Signed-off-by: Peter Hutterer 

diff --git a/src/evdev.c b/src/evdev.c
index 96fd97d..f627fd0 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -784,7 +784,6 @@ EvdevProcessAbsoluteMotionEvent(InputInfoPtr pInfo, struct 
input_event *ev)
 
 if (ev->code >= ABS_MT_SLOT) {
 EvdevProcessTouchEvent(pInfo, ev);
-pEvdev->abs_queued = 1;
 } else if (!pEvdev->mt_mask) {
 map = pEvdev->abs_axis_map[ev->code];
 

commit 425ed6017a42937f69c1e8450ea8f3c6c6c20928
Author: David Strobach 
Date:   Thu Nov 17 20:47:31 2016 +0100

Middle emulation - make the emulated button number configurable

Sometimes it may be desirable to remap physical middle button
to something else and use emulation instead. The emulation is
however hardcoded to emulate physical button 2, so the emulated
button gets remapped together with the physical one. This patch
adds the Emulate3Button configuration option to allow for user
selection of the emulated button number and a configuration
like this:

Section "InputClass"
Identifier "Middle button emulation config"
MatchProduct " some device ..."
MatchDriver "evdev"
Option "Emulate3Buttons" "on"
Option "Emulate3Button" "9"
EndSection

Signed-off-by: Peter Hutterer 

diff --git a/include/evdev-properties.h b/include/evdev-properties.h
index 8ae5ba3..c61aa49 100644
--- a/include/evdev-properties.h
+++ b/include/evdev-properties.h
@@ -33,6 +33,8 @@
 #define EVDEV_PROP_MIDBUTTON "Evdev Middle Button Emulation"
 /* CARD32 */
 #define EVDEV_PROP_MIDBUTTON_TIMEOUT "Evdev Middle Button Timeout"
+/* CARD8 */
+#define EVDEV_PROP_MIDBUTTON_BUTTON "Evdev Middle Button Button"
 
 /* Wheel emulation */
 /* BOOL */
diff --git a/man/evdev.man b/man/evdev.man
index 8d84364..e39736a 100644
--- a/man/evdev.man
+++ b/man/evdev.man
@@ -94,6 +94,11 @@ Sets the timeout (in milliseconds) that the driver waits 
before deciding
 if two buttons where pressed "simultaneously" when 3 button emulation is
 enabled.  Default: 50. Property: "Evdev Middle Button Timeout".
 .TP 7
+.BI "Option \*qEmulate3Button\*q \*q" integer \*q
+Specifies the physical button number to be emitted if middle button emulation
+is triggered.
+Default: 2.  Property: "Evdev Middle Button Button".
+.TP 7
 .BI "Option \*qEmulateWheel\*q \*q" boolean \*q
 Enable/disable "wheel" emulation.  Wheel emulation means emulating button
 press/release events when the mouse is moved while a specific real button
@@ -283,6 +288,9 @@ value.
 .BI "Evdev Middle Button Timeout"
 1 16-bit positive value.
 .TP 7
+.BI "Evdev Middle Button Button"
+1 8-bit value, allowed range 0-32, 0 disables the button.
+.TP 7
 .BI "Evdev Wheel Emulation"
 1 boolean value (8 bit, 0 or 1).
 .TP 7
diff --git a/src/emuMB.c b/src/emuMB.c
index d1777aa..4f00e0d 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -45,6 +45,7 @@
 
 static Atom prop_mbemu = 0; /* Middle button emulation on/off property */
 static Atom prop_mbtimeout = 0; /* Middle button timeout property */
+static Atom prop_mbbuton   = 0; /* Middle button target button property */
 /*
  * Lets create a simple finite-state machine for 3 button emulation:
  *
@@ -185,6 +186,7 @@ EvdevMBEmuTimer(InputInfoPtr pInfo)
 {
 EvdevPtr pEvdev = pInfo->private;
 int id;
+int mapped_id;
 
 #if 

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

2016-10-13 Thread Emilio Pozuelo Monfort
 configure.ac   |2 +-
 src/emuMB.c|   21 -
 src/emuThird.c |   13 ++---
 src/evdev.c|5 -
 src/evdev.h|   16 ++--
 5 files changed, 41 insertions(+), 16 deletions(-)

New commits:
commit 551db5b86e2a19e027e57571b8e5405dacb8bd67
Author: Peter Hutterer 
Date:   Sat Oct 1 17:48:30 2016 +1000

evdev 2.10.4

Signed-off-by: Peter Hutterer 

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

commit bb8bde7456def4186f9a4a0a9f98d53c949e1450
Author: Keith Packard 
Date:   Tue May 31 17:52:43 2016 -0700

Support XINPUT ABI 24 (remove select mask from block/wakeup handlers)

The evdev driver wasn't using the select mask arguments, so this
change just involves adjusting the argument lists.

Signed-off-by: Keith Packard 
Signed-off-by: Peter Hutterer 

diff --git a/src/emuMB.c b/src/emuMB.c
index 94e50c4..d1777aa 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -268,9 +268,7 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL 
press)
 }
 
 
-void EvdevMBEmuWakeupHandler(pointer data,
- int i,
- pointer LastSelectMask)
+void EvdevMBEmuWakeupHandler(WAKEUP_HANDLER_ARGS)
 {
 InputInfoPtr pInfo = (InputInfoPtr)data;
 EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
@@ -284,9 +282,7 @@ void EvdevMBEmuWakeupHandler(pointer data,
 }
 }
 
-void EvdevMBEmuBlockHandler(pointer data,
-struct timeval **waitTime,
-pointer LastSelectMask)
+void EvdevMBEmuBlockHandler(BLOCK_HANDLER_ARGS)
 {
 InputInfoPtrpInfo = (InputInfoPtr) data;
 EvdevPtrpEvdev= (EvdevPtr) pInfo->private;
diff --git a/src/evdev.h b/src/evdev.h
index 0ebcfa0..c506296 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -71,6 +71,14 @@
 #define HAVE_THREADED_INPUT1
 #endif
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 24
+#define BLOCK_HANDLER_ARGS void *data, void *waitTime
+#define WAKEUP_HANDLER_ARGSvoid *data, int i
+#else
+#define BLOCK_HANDLER_ARGS pointer data, struct timeval **waitTime, 
pointer LastSelectMask
+#define WAKEUP_HANDLER_ARGSvoid *data, int i, pointer LastSelectMask
+#endif
+
 #define EVDEV_MAXBUTTONS 32
 #define EVDEV_MAXQUEUE 32
 
@@ -264,8 +272,8 @@ unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr 
pEvdev, int code);
 /* Middle Button emulation */
 int  EvdevMBEmuTimer(InputInfoPtr);
 BOOL EvdevMBEmuFilterEvent(InputInfoPtr, int, BOOL);
-void EvdevMBEmuWakeupHandler(pointer, int, pointer);
-void EvdevMBEmuBlockHandler(pointer, struct timeval**, pointer);
+void EvdevMBEmuWakeupHandler(WAKEUP_HANDLER_ARGS);
+void EvdevMBEmuBlockHandler(BLOCK_HANDLER_ARGS);
 void EvdevMBEmuPreInit(InputInfoPtr);
 void EvdevMBEmuOn(InputInfoPtr);
 void EvdevMBEmuFinalize(InputInfoPtr);

commit 7b1267f7f18c478d3dc34a7668eaefa402815891
Author: Keith Packard 
Date:   Tue May 31 17:52:42 2016 -0700

Support XINPUT ABI version 23 (threaded input)

Use input_lock/input_unlock calls instead of SIGIO functions

Signed-off-by: Keith Packard 
Signed-off-by: Peter Hutterer 

diff --git a/src/emuMB.c b/src/emuMB.c
index b25eac8..94e50c4 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -184,10 +184,13 @@ int
 EvdevMBEmuTimer(InputInfoPtr pInfo)
 {
 EvdevPtr pEvdev = pInfo->private;
-intsigstate;
 int id;
 
-sigstate = xf86BlockSIGIO ();
+#if HAVE_THREADED_INPUT
+input_lock();
+#else
+int sigstate = xf86BlockSIGIO();
+#endif
 
 pEvdev->emulateMB.pending = FALSE;
 if ((id = stateTab[pEvdev->emulateMB.state][4][0]) != 0) {
@@ -200,7 +203,11 @@ EvdevMBEmuTimer(InputInfoPtr pInfo)
 pEvdev->emulateMB.state);
 }
 
-xf86UnblockSIGIO (sigstate);
+#if HAVE_THREADED_INPUT
+input_unlock();
+#else
+xf86UnblockSIGIO(sigstate);
+#endif
 return 0;
 }
 
diff --git a/src/emuThird.c b/src/emuThird.c
index 5f14d33..dd49a84 100644
--- a/src/emuThird.c
+++ b/src/emuThird.c
@@ -89,12 +89,19 @@ Evdev3BEmuTimer(OsTimerPtr timer, CARD32 time, pointer arg)
 InputInfoPtr  pInfo= (InputInfoPtr)arg;
 EvdevPtr  pEvdev   = pInfo->private;
 struct emulate3B *emu3B= >emulate3B;
-int   sigstate = 0;
 
-sigstate = xf86BlockSIGIO ();
+#if HAVE_THREADED_INPUT
+input_lock();
+#else
+int sigstate = xf86BlockSIGIO();
+#endif
 emu3B->state = EM3B_EMULATING;
 Evdev3BEmuPostButtonEvent(pInfo, 

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

2016-09-24 Thread Julien Cristau
 configure.ac |2 +-
 src/evdev.c  |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7c1971d9e7b73b861874633a33f97487abf1d45d
Author: Peter Hutterer 
Date:   Wed Jun 1 11:41:03 2016 +1000

evdev 2.10.3

Signed-off-by: Peter Hutterer 

diff --git a/configure.ac b/configure.ac
index 47ab4f8..920154d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-evdev],
-[2.10.2],
+[2.10.3],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-input-evdev])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 9a6952dafe7241d4987eedd4637e5a9785d7ec23
Author: Peter Hutterer 
Date:   Thu May 12 15:22:19 2016 +1000

Restore non-xy axes updates

This broke in d24431a1863c49aa Restore wheel emulation for absolute devices,
last hunk when the valuator update was moved to before any early exit
condition. But that new update only applies to valuator maps < 2, i.e. x/y
only. Other valuators are now ignored and remain on 0 forever.

Restore the valuator update.

https://bugs.freedesktop.org/show_bug.cgi?id=95315

Signed-off-by: Peter Hutterer 

diff --git a/src/evdev.c b/src/evdev.c
index 2c88343..341db61 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -796,6 +796,7 @@ EvdevProcessAbsoluteMotionEvent(InputInfoPtr pInfo, struct 
input_event *ev)
 pEvdev->rel_queued = 1;
 }
 } else {
+valuator_mask_set(pEvdev->abs_vals, map, value);
 pEvdev->abs_queued = 1;
 }
 }



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

2016-05-19 Thread Julien Cristau
 configure.ac   |2 +-
 man/evdev.man  |   13 +
 src/emuWheel.c |   13 +++--
 src/evdev.c|   20 +---
 4 files changed, 34 insertions(+), 14 deletions(-)

New commits:
commit f12eca9f8392934031cb250e7a2a5ed1d5ca11cf
Author: Peter Hutterer 
Date:   Fri Apr 29 09:13:35 2016 +1000

evdev 2.10.2

Signed-off-by: Peter Hutterer 

diff --git a/configure.ac b/configure.ac
index 3fe2012..47ab4f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-evdev],
-[2.10.1],
+[2.10.2],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-input-evdev])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 33dc3d7128456d51b1fe6228096e6b714a3e900b
Author: Peter Hutterer 
Date:   Wed Apr 27 09:01:16 2016 +1000

Prevent buffer overrun accessing btn_labels

We go up to BTN_JOYSTICK, hence group can have a value of up to including 
15.
The actual btn_labels only has 6 elements though.

Found by coverity.

Signed-off-by: Peter Hutterer 

diff --git a/src/evdev.c b/src/evdev.c
index 0fcb0bb..2c88343 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2790,6 +2790,9 @@ static void EvdevInitButtonLabels(EvdevPtr pEvdev, int 
natoms, Atom *atoms)
 int group = (button % 0x100)/16;
 int idx = button - ((button/16) * 16);
 
+if (group >= ArrayLength(btn_labels))
+break;
+
 if (!libevdev_has_event_code(pEvdev->dev, EV_KEY, button))
 continue;
 

commit 7b0a65d989117d1b071101221ff1b97c1b4d1946
Author: Peter Hutterer 
Date:   Fri Jan 15 14:01:02 2016 +1000

Don't reset the other axis on wheel emulation scroll buildup

The idea was that of a direction lock: as we move vertically we should not
build up any horizontal scroll motion even if we move slightly diagonally.

The effect was though that the axis would be reset completely as soon as an
event from the other axis occured. With the default threshold of 10, if one 
in
ten events was a REL_X, we'd never get a wheel event.

Drop this code, it's not needed. By default wheel emulation doesn't do
horizontal scrolling, if a config snippet sets XAxisMapping the user wants
horizontal scrolling. And since we just add the value anyway, as long as the
user does a roughly vertical motion we won't get over the threshold anyway.

https://bugs.freedesktop.org/show_bug.cgi?id=93617

Signed-off-by: Peter Hutterer 

diff --git a/src/emuWheel.c b/src/emuWheel.c
index f1d1990..c82c240 100644
--- a/src/emuWheel.c
+++ b/src/emuWheel.c
@@ -95,7 +95,7 @@ BOOL
 EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv)
 {
 EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
-WheelAxisPtr pAxis = NULL, pOtherAxis = NULL;
+WheelAxisPtr pAxis = NULL;
 int value = pEv->value;
 
 /* Has wheel emulation been configured to be enabled? */
@@ -130,13 +130,11 @@ EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct 
input_event *pEv)
/* ABS_X has the same value as REL_X, so this case catches both */
case REL_X:
pAxis = &(pEvdev->emulateWheel.X);
-   pOtherAxis = &(pEvdev->emulateWheel.Y);
break;
 
/* ABS_Y has the same value as REL_Y, so this case catches both */
case REL_Y:
pAxis = &(pEvdev->emulateWheel.Y);
-   pOtherAxis = &(pEvdev->emulateWheel.X);
break;
 
default:
@@ -144,15 +142,10 @@ EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct 
input_event *pEv)
}
 
/* If we found REL_X, REL_Y, ABS_X or ABS_Y then emulate a mouse
-  wheel.  Reset the inertia of the other axis when a scroll event
-  was sent to avoid the buildup of erroneous scroll events if the
-  user doesn't move in a perfectly straight line.
+  wheel.
 */
if (pAxis)
-   {
-   if (EvdevWheelEmuInertia(pInfo, pAxis, value))
-   pOtherAxis->traveled_distance = 0;
-   }
+   EvdevWheelEmuInertia(pInfo, pAxis, value);
 
/* Eat motion events while emulateWheel button pressed. */
return TRUE;

commit d24431a1863c49aa9edcabf535ffa64bfa87053c
Author: Peter Hutterer 
Date:   Thu Jan 14 10:41:46 2016 +1000

Restore wheel emulation for absolute devices

Wheel emulation relies on oldVals, which stopped updating in 3dcf6f123c5.

Since wheel emulation may filter the abs event, store the event before we do
anything with it. If we really want the abs_event, abs_queued will be set to
1, otherwise the value will be ignored.

And now that we know abs_value is always valied, we can copy its value into
old_vals, so 

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

2016-01-27 Thread Timo Aaltonen
Rebased ref, commits from common ancestor:
commit 6a3beab6137b262fc847093ed5fa51ff70df6a21
Author: Peter Hutterer 
Date:   Fri Jan 8 15:11:59 2016 +1000

evdev 2.10.1

Signed-off-by: Peter Hutterer 

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

commit d7e61a7074b802b49f57549530b289bbaa0a4855
Author: Peter Hutterer 
Date:   Tue Nov 10 14:35:51 2015 +1000

Only map x and y to axes 0 and 1

The Logitech G600 has one device with all axes north of ABS_MISC. The 
current
code assigns ABS_MISC as first axis to map to axis 0, i.e. x. On button 
press,
one node sends the BTN_LEFT but the other node sends an ABS_MISC with a 1 0
value. ABS_MISC is mapped to axis 0, this moves the pointer to (0, y) on
every button click.

Avoid this by simply mapping any axis other than x/y to at least axis 3, and
make sure we only override the MT 0/1 axes when we actually have MT axes.

https://bugs.freedesktop.org/show_bug.cgi?id=92856

Signed-off-by: Peter Hutterer 
Reviewed-by: Keith Packard 

diff --git a/src/evdev.c b/src/evdev.c
index 17d9d61..3176660 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1377,7 +1377,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int 
num_scroll_axes)
 }
 atoms = malloc((pEvdev->num_vals + num_mt_axes) * sizeof(Atom));
 
-i = 0;
+i = 2;
 for (axis = ABS_X; i < MAX_VALUATORS && axis <= ABS_MAX; axis++) {
 int j;
 pEvdev->abs_axis_map[axis] = -1;
@@ -1385,9 +1385,14 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int 
num_scroll_axes)
 is_blacklisted_axis(axis))
 continue;
 
-mapping = i;
+if (axis == ABS_X)
+mapping = 0;
+else if (axis == ABS_Y)
+mapping = 1;
+else
+mapping = i;
 
-for (j = 0; j < ArrayLength(mt_axis_mappings); j++)
+for (j = 0; !pEvdev->fake_mt && j < ArrayLength(mt_axis_mappings); j++)
 {
 if (mt_axis_mappings[j].code == axis)
 mt_axis_mappings[j].mapping = mapping;

commit 01e7ac48546d4534fa420ea1873214e738ea125d
Author: Peter Hutterer 
Date:   Wed Oct 28 14:28:20 2015 +1000

evdev 2.10.0

Signed-off-by: Peter Hutterer 

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

commit 034be31159f22ce28d84994d541a45ee44963fd8
Author: Thomas Hindoe Paaboel Andersen 
Date:   Tue Jan 20 00:44:40 2015 +0100

Add "Resolution" option for mice to the evdev driver

It can be used to scale the resolution of a mouse to that of a 1000 DPI
mouse. This can be useful to make high resolution mice less sensitive
without turning off acceleration. The target of 1000 DPI is used as the
same default is used in libinput. If the option is not set no scaling
will be done.

https://bugs.freedesktop.org/show_bug.cgi?id=88134
Signed-off-by: Thomas Hindoe Paaboel Andersen 
Signed-off-by: Peter Hutterer 

diff --git a/man/evdev.man b/man/evdev.man
index 06613fc..e70ae1f 100644
--- a/man/evdev.man
+++ b/man/evdev.man
@@ -238,6 +238,12 @@ Default: "1".  Property: "Evdev Scrolling Distance".
 .BI "Option \*qDialDelta\*q \*q" integer \*q
 The amount of motion considered one unit of turning the dial.  Default: "1".
 Property: "Evdev Scrolling Distance".
+.TP 7
+.BI "Option \*qResolution\*q \*q" integer \*q
+Sets the resolution of the device in dots per inch. The resolution is used
+to scale relative motion events from mouse devices to 1000 DPI resolution. This
+can be used to make high resolution mice less sensitive without turning off
+acceleration. If set to 0 no scaling will be performed. Default: "0".
 
 .SH SUPPORTED PROPERTIES
 The following properties are provided by the
diff --git a/src/emuThird.c b/src/emuThird.c
index 7461767..5f14d33 100644
--- a/src/emuThird.c
+++ b/src/emuThird.c
@@ -229,8 +229,8 @@ Evdev3BEmuProcessAbsMotion(InputInfoPtr pInfo, ValuatorMask 
*vals)
 {
 if (valuator_mask_isset(vals, axis))
 {
-int delta = valuator_mask_get(vals, axis) - emu3B->startpos[axis];
-if (abs(delta) > 

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

2013-10-07 Thread Michele Cane
 configure.ac|3 
 src/Makefile.am |4 
 src/apple.c |3 
 src/emuWheel.c  |1 
 src/evdev.c |  480 +++-
 src/evdev.h |   12 -
 6 files changed, 243 insertions(+), 260 deletions(-)

New commits:
commit d9aadfd5f05abd9a65977d9d36cbe159d6e05386
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Mon Oct 7 09:21:57 2013 +1100

bump to 2.8.99

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

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

commit 54a3120e339e55fc4721543abb15692c3e9ede09
Author: Peter De Wachter pdewa...@gmail.com
Date:   Wed Mar 20 00:35:45 2013 +0100

Map REL_DIAL to vertical scrolling

This makes the absolute axis codepath behave the same as the relative axis
path.

Signed-off-by: Peter De Wachter pdewa...@gmail.com
Reviewed-by: Peter Hutterer peter.hutte...@who-t.net
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/evdev.c b/src/evdev.c
index b97b841..bafe81f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1574,7 +1574,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int 
want_scroll_axes)
NO_AXIS_LIMITS, NO_AXIS_LIMITS,
0, 0, 0, Relative);
 SetScrollValuator(device, pEvdev-rel_axis_map[idx],
-  SCROLL_TYPE_HORIZONTAL, 1.0,
+  SCROLL_TYPE_VERTICAL, -1.0,
   SCROLL_FLAG_NONE);
 }
 }

commit 164c62a97591d4c9b649460e7442977ea82ac02b
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed May 29 07:17:41 2013 +1000

Use libevdev as backend

Removes the need to ioctl manually and check bits, with all the dangers that
come with that. libevdev is much better prepared for invalid values, OOB
checks, etc.

Plus, we get almost free SYN_DROPPED handling as well which we didn't have
before.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Reviewed-by: Adam Jackson a...@redhat.com

diff --git a/configure.ac b/configure.ac
index b8a9c41..2953d15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,7 @@ PKG_CHECK_MODULES(XORG, [xorg-server = 1.10] xproto 
inputproto)
 PKG_CHECK_MODULES(UDEV, libudev)
 
 PKG_CHECK_MODULES(XI22, [inputproto = 2.1.99.3] [xorg-server = 1.11.99.901], 
HAVE_XI22=yes, HAVE_XI22=no)
+PKG_CHECK_MODULES(LIBEVDEV, [libevdev = 0.4])
 
 if test x$HAVE_XI22 = xyes; then
 # Obtain compiler/linker options for mtdev
diff --git a/src/Makefile.am b/src/Makefile.am
index da76540..5e0c3b3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -26,11 +26,11 @@
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
 
 AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
-AM_CPPFLAGS =-I$(top_srcdir)/include
+AM_CPPFLAGS =-I$(top_srcdir)/include $(LIBEVDEV_CFLAGS)
 
 @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
 @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
-@DRIVER_NAME@_drv_la_LIBADD = $(MTDEV_LIBS) $(UDEV_LIBS)
+@DRIVER_NAME@_drv_la_LIBADD = $(MTDEV_LIBS) $(UDEV_LIBS) $(LIBEVDEV_LIBS)
 @DRIVER_NAME@_drv_ladir = @inputdir@
 
 @DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c \
diff --git a/src/apple.c b/src/apple.c
index 8e00a84..71f1dc3 100644
--- a/src/apple.c
+++ b/src/apple.c
@@ -303,7 +303,8 @@ EvdevAppleInitProperty(DeviceIntPtr dev)
 enum fkeymode fkeymode;
 
 if (!product_check(apple_keyboard_table,
-   pEvdev-id_vendor, pEvdev-id_product))
+   libevdev_get_id_vendor(pEvdev-dev),
+   libevdev_get_id_product(pEvdev-dev)))
 return;
 
 fkeymode = get_fnmode();
diff --git a/src/evdev.c b/src/evdev.c
index 209ea7e..dbc5eb4 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -178,23 +178,6 @@ static int EvdevSwitchMode(ClientPtr client, DeviceIntPtr 
device, int mode)
 return Success;
 }
 
-static size_t EvdevCountBits(unsigned long *array, size_t nlongs)
-{
-unsigned int i;
-size_t count = 0;
-
-for (i = 0; i  nlongs; i++) {
-unsigned long x = array[i];
-
-while (x  0)
-{
-count += (x  0x1);
-x = 1;
-}
-}
-return count;
-}
-
 static inline int EvdevBitIsSet(const unsigned long *array, int bit)
 {
 return !!(array[bit / LONG_BITS]  (1LL  (bit % LONG_BITS)));
@@ -433,13 +416,16 @@ EvdevSwapAbsValuators(EvdevPtr pEvdev, ValuatorMask *mask)
 
 for(i = 0; i = 1; i++) {
 if (valuator_mask_isset(mask, i)) {
+const struct input_absinfo *abs1 =
+

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

2013-10-07 Thread Julien Cristau
Rebased ref, commits from common ancestor:


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1vt6gg-0001te...@vasks.debian.org



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

2013-10-07 Thread Michele Cane
 configure.ac |2 +-
 src/evdev.c  |8 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 51575b60b14d414490d31ff23f07c30431525667
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Mon Oct 7 09:23:09 2013 +1100

evdev 2.8.2

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

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

commit f285567d372514d31096cc25a467d5d2e182885a
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue Aug 13 14:44:26 2013 +1000

Write a SYN_REPORT after the last LED

When writing LED values to the device, append a SYN_REPORT to the list to
ensure other clients are updated immediately. Otherwise, the LED events
will be queued and not sent to other clients until the next input event
arrives.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Reviewed-by: Daniel Stone dan...@fooishbar.org
(cherry picked from commit 27926b3763e525470ec8e4ac9a97aa0e02f1dd95)

diff --git a/src/evdev.c b/src/evdev.c
index d36eb54..af4aba3 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1157,7 +1157,7 @@ EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl)
 };
 
 InputInfoPtr pInfo;
-struct input_event ev[ArrayLength(bits)];
+struct input_event ev[ArrayLength(bits) + 1];
 int i;
 
 memset(ev, 0, sizeof(ev));
@@ -1169,6 +1169,10 @@ EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl)
 ev[i].value = (ctrl-leds  bits[i].xbit)  0;
 }
 
+ev[i].type = EV_SYN;
+ev[i].code = SYN_REPORT;
+ev[i].value = 0;
+
 write(pInfo-fd, ev, sizeof ev);
 }
 

commit af1d0858775dd130c59de921210a114580fef719
Author: Peter De Wachter pdewa...@gmail.com
Date:   Wed Mar 20 00:35:45 2013 +0100

Map REL_DIAL to vertical scrolling

This makes the absolute axis codepath behave the same as the relative axis
path.

Signed-off-by: Peter De Wachter pdewa...@gmail.com
Reviewed-by: Peter Hutterer peter.hutte...@who-t.net
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 54a3120e339e55fc4721543abb15692c3e9ede09)

diff --git a/src/evdev.c b/src/evdev.c
index ba2a98c..d36eb54 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1541,7 +1541,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int 
want_scroll_axes)
NO_AXIS_LIMITS, NO_AXIS_LIMITS,
0, 0, 0, Relative);
 SetScrollValuator(device, pEvdev-rel_axis_map[idx],
-  SCROLL_TYPE_HORIZONTAL, 1.0,
+  SCROLL_TYPE_VERTICAL, -1.0,
   SCROLL_FLAG_NONE);
 }
 }


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1vt6uv-0003ek...@vasks.debian.org



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

2013-07-21 Thread Julien Cristau
 autogen.sh|4 
 configure.ac  |3 
 man/evdev.man |6 
 src/Makefile.am   |5 
 src/axis_labels.h |  198 +
 src/emuMB.c   |4 
 src/emuWheel.c|8 
 src/evdev.c   |  782 +++---
 src/evdev.h   |   15 -
 9 files changed, 628 insertions(+), 397 deletions(-)

New commits:
commit 8a9b1ec6b58a36910a03f3e8b1f9bc8d91f87204
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Jul 11 11:09:24 2013 +1000

evdev 2.8.1

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

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

commit 356565111a6bb98f15fbaaf4f527aed8c87b477b
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Jun 27 05:47:38 2013 +1000

Don't allow a wheel emulation inertia of 0 (#66125)

Inertia of 0 results in an infinite loop of events being sent to the server.

X.Org Bug 66125 http://bugs.freedesktop.org/show_bug.cgi?id=66125

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/emuWheel.c b/src/emuWheel.c
index 5774930..81b777f 100644
--- a/src/emuWheel.c
+++ b/src/emuWheel.c
@@ -392,7 +392,7 @@ EvdevWheelEmuSetProperty(DeviceIntPtr dev, Atom atom, 
XIPropertyValuePtr val,
 
 inertia = *((CARD16*)val-data);
 
-if (inertia  0)
+if (inertia = 0)
 return BadValue;
 
 if (!checkonly)

commit fff3a60fbf5c81b337ae4eaf160feacdfc8c2465
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed May 29 13:26:57 2013 +1000

Use EvdevBitIsSet, not the server's BitIsOn

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/evdev.c b/src/evdev.c
index 34cd3a1..ba2a98c 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1267,7 +1267,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int 
want_scroll_axes)
 for (j = 0; j  ArrayLength(mt_axis_mappings); j++)
 {
 if (mt_axis_mappings[j].mt_code == axis 
-BitIsOn(pEvdev-abs_bitmask, mt_axis_mappings[j].code))
+EvdevBitIsSet(pEvdev-abs_bitmask, 
mt_axis_mappings[j].code))
 {
 mt_axis_mappings[j].needs_mapping = TRUE;
 skip = TRUE;

commit 8f209ac60d10ba61aa6ea2bec02dbfa54ebe8f17
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed May 29 07:18:19 2013 +1000

Drop cached name and led_bitmask - nothing reads this

Both fields are write-only as of xf86-input-evdev-2.5.99.902-1-g1ced7ec

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/src/evdev.c b/src/evdev.c
index 86af151..34cd3a1 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1983,12 +1983,10 @@ EvdevCache(InputInfoPtr pInfo)
 int i, len;
 struct input_id id;
 
-char name[1024]  = {0};
 unsigned long bitmask[NLONGS(EV_CNT)]  = {0};
 unsigned long key_bitmask[NLONGS(KEY_CNT)] = {0};
 unsigned long rel_bitmask[NLONGS(REL_CNT)] = {0};
 unsigned long abs_bitmask[NLONGS(ABS_CNT)] = {0};
-unsigned long led_bitmask[NLONGS(LED_CNT)] = {0};
 
 
 if (ioctl(pInfo-fd, EVIOCGID, id)  0)
@@ -2000,13 +1998,6 @@ EvdevCache(InputInfoPtr pInfo)
 pEvdev-id_vendor = id.vendor;
 pEvdev-id_product = id.product;
 
-if (ioctl(pInfo-fd, EVIOCGNAME(sizeof(name) - 1), name)  0) {
-xf86IDrvMsg(pInfo, X_ERROR, ioctl EVIOCGNAME failed: %s\n, 
strerror(errno));
-goto error;
-}
-
-strcpy(pEvdev-name, name);
-
 len = ioctl(pInfo-fd, EVIOCGBIT(0, sizeof(bitmask)), bitmask);
 if (len  0) {
 xf86IDrvMsg(pInfo, X_ERROR, ioctl EVIOCGBIT for bitmask failed: %s\n,
@@ -2034,15 +2025,6 @@ EvdevCache(InputInfoPtr pInfo)
 
 memcpy(pEvdev-abs_bitmask, abs_bitmask, len);
 
-len = ioctl(pInfo-fd, EVIOCGBIT(EV_LED, sizeof(led_bitmask)), 
led_bitmask);
-if (len  0) {
-xf86IDrvMsg(pInfo, X_ERROR, ioctl EVIOCGBIT for EV_LED failed: %s\n,
-strerror(errno));
-goto error;
-}
-
-memcpy(pEvdev-led_bitmask, led_bitmask, len);
-
 /*
  * Do not try to validate absinfo data since it is not expected
  * to be static, always refresh it in evdev structure.
diff --git a/src/evdev.h b/src/evdev.h
index 6ae389c..4742b43 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -235,12 +235,10 @@ typedef struct {
 OsTimerPtr reopen_timer;
 
 /* Cached info from device. */
-char name[1024];
 unsigned long bitmask[NLONGS(EV_CNT)];
 unsigned long key_bitmask[NLONGS(KEY_CNT)];
 unsigned long rel_bitmask[NLONGS(REL_CNT)];
 unsigned long 

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

2012-03-20 Thread Cyril Brulebois
 configure.ac   |   15 
 include/evdev-properties.h |   21 
 man/evdev.man  |   28 
 src/Makefile.am|5 
 src/apple.c|  312 
 src/draglock.c |   33 
 src/emuMB.c|7 
 src/emuThird.c |  416 +++
 src/emuWheel.c |   54 -
 src/evdev.c| 1610 +
 src/evdev.h|  117 ++-
 11 files changed, 1839 insertions(+), 779 deletions(-)

New commits:
commit 99340147b9092a5aaec997eca407282a51e1f063
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Mar 15 15:46:32 2012 +1000

Fix inverted horizontal scroll (#46205)

REL_HWHEEL has a positive increment, not a negative one like REL_WHEEL.

X.Org Bug 46205 http://bugs.freedesktop.org/show_bug.cgi?id=46205

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Reviewed-by: Chase Douglas chase.doug...@canonical.com

diff --git a/src/evdev.c b/src/evdev.c
index d540b87..8cf630c 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1600,7 +1600,7 @@ EvdevAddRelValuatorClass(DeviceIntPtr device)
 else if (axis == REL_DIAL)
 SetScrollValuator(device, axnum, SCROLL_TYPE_VERTICAL, -1.0, 
SCROLL_FLAG_NONE);
 else if (axis == REL_HWHEEL)
-SetScrollValuator(device, axnum, SCROLL_TYPE_HORIZONTAL, -1.0, 
SCROLL_FLAG_NONE);
+SetScrollValuator(device, axnum, SCROLL_TYPE_HORIZONTAL, 1.0, 
SCROLL_FLAG_NONE);
 #endif
 }
 

commit 76b1d58a9791257fa8b4e6d3322fcb082c86b18a
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed Mar 7 20:39:09 2012 +1000

evdev 2.7.0

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

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

commit 224a28de25fda654040a9fd4e5c4d748c9e29809
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed Jan 25 16:03:34 2012 +1000

Only force REL_X/Y if no ABS_X/Y exists

5c5b2c8db851df7921cedd888222a6630a007fd8 added forced x/y axes if a device
has any axes of the same mode. This was too broad a brush, some devices have
a relative wheel but absolute x/y axes and would now get misdetected as
purely relative device.

Only force relative axes if a device no rel x/y _and_ no abs x/y.

Reproducible: virtual machine with QEMU USB Tablet will stop working

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
Reviewed-by: Chase Douglas chase.doug...@canonical.com

diff --git a/src/evdev.c b/src/evdev.c
index 32fe38b..d540b87 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2146,7 +2146,8 @@ EvdevProbe(InputInfoPtr pInfo)
 if (EvdevBitIsSet(pEvdev-rel_bitmask, REL_X) 
 EvdevBitIsSet(pEvdev-rel_bitmask, REL_Y)) {
 xf86IDrvMsg(pInfo, X_PROBED, Found x and y relative axes\n);
-} else
+} else if (!EvdevBitIsSet(pEvdev-abs_bitmask, ABS_X) ||
+   !EvdevBitIsSet(pEvdev-abs_bitmask, ABS_Y))
 EvdevForceXY(pInfo, Relative);
 } else {
 xf86IDrvMsg(pInfo, X_INFO, Relative axes present but ignored.\n);

commit bc2f01ab838119a962f5e5eabb36e33d4c084f2c
Author: Chase Douglas chase.doug...@canonical.com
Date:   Thu Jan 19 14:17:34 2012 -0800

Copy last valuator values into new touch valuator masks

Evdev is a 100% stateful protocol. The following represents three
touches. Two touches begin and end at the same time at (500, 500) and
(1000, 1000). The third touch begins after the first two end, and is at
(500, 500).

ABS_MT_SLOT 0   /* Set touch slot */
ABS_MT_TRACKING_ID  0   /* New touch with ID 0 in slot 0 */
ABS_MT_POSITION_X   500 /* Initial X position */
ABS_MT_POSITION_Y   500 /* Initial Y position */
ABS_MT_SLOT 1   /* Set touch slot */
ABS_MT_TRACKING_ID  1   /* New touch with ID 1 in slot 1 */
ABS_MT_POSITION_X   1000/* Initial X position */
ABS_MT_POSITION_Y   1000/* Initial Y position */
SYNC/* End of frame */
ABS_MT_SLOT 0   /* Go back to slot 0 */
ABS_MT_TRACKING_ID  -1  /* Touch in slot 0 ended */
ABS_MT_SLOT 1   /* Go to slot 1 */
ABS_MT_TRACKING_ID  -1  /* Touch in slot 1 ended */
SYNC/* End of frame */
ABS_MT_SLOT 0   /* Go back to slot 0 */
ABS_MT_TRACKING_ID  2   /* New touch in slot 0 with ID 2 */
SYNC/* End of frame */
ABS_MT_TRACKING_ID  -1  /* Touch 

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

2011-12-31 Thread Cyril Brulebois
Rebased ref, commits from common ancestor:
commit 30c3645e20e945b0f8b7dc624748948464be606e
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue Jan 11 12:46:40 2011 +1000

evdev 2.6.0

Signed-off-by: Peter Hutterer peter.hutte...@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.doug...@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.doug...@canonical.com
Signed-off-by: Peter Hutterer peter.hutte...@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 540a4cce9071fce183c941ded35e7e8fb8f3507e
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Wed Jan 5 09:04:56 2011 +1000

evdev 2.5.99.903

Signed-off-by: Peter Hutterer peter.hutte...@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 bed25600f66db245b895a48d6edca30568ca7559
Author: Peter Hutterer peter.hutte...@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.hutte...@who-t.net
Reviewed-by: Chase Douglas chase.doug...@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 

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

2010-01-07 Thread Julien Cristau
Rebased ref, commits from common ancestor:
commit f7850a40424f7ec0c32fb2b46d427b51b5410d99
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Fri Dec 11 13:42:33 2009 +1000

evdev 2.3.2

Signed-off-by: Peter Hutterer peter.hutte...@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.hutte...@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.hutte...@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.hutte...@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.hutte...@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 dw...@infradead.org
Date:   Tue Dec 1 00:14:54 2009 +

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.woodho...@intel.com
Acked-by: Peter Hutterer peter.hutte...@who-t.net
Signed-off-by: Peter Hutterer peter.hutte...@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,

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

2009-08-20 Thread Brice Goglin
 configure.ac |2 +-
 src/evdev.c  |3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit cd24c2cc183d56603056805ed0084e3abb11c758
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Fri Aug 21 09:03:10 2009 +1000

evdev 2.2.5

diff --git a/configure.ac b/configure.ac
index 5090e43..76075a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-evdev],
-2.2.4,
+2.2.5,
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 xf86-input-evdev)
 

commit c8a0f1cf362152ae275717d367afa2179d6bbc0b
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Aug 20 11:02:31 2009 +1000

Only take the driver-internal button mapping to count buttons (#23405)

Regression:
If a user has multiple buttons mapped to the same button number, the
number of buttons counted is set to a wrong value.  e.g. a button
mapping of 1 1 1 for a mouse with three buttons would only initialize 1
button to the X server.

In the future, the user cannot change this button mapping as the server
only knows about one button.

The user-supplied button map (option ButtonMapping) shouldn't matter when
counting the buttons. Only the driver-internal mapping (BTN_0 - button 1,
etc.) matters.

X.Org Bug 23405 http://bugs.freedesktop.org/show_bug.cgi?id=23405

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 415b6ffa958e3103eeb52af4ccd881497169eed4)

diff --git a/src/evdev.c b/src/evdev.c
index 9f330e3..85ed233 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1544,8 +1544,7 @@ EvdevProbe(InputInfoPtr pInfo)
 int mapping = 0;
 if (TestBit(i, pEvdev-key_bitmask))
 {
-mapping =
-pEvdev-btnmap[EvdevUtilButtonEventToButtonNumber(pEvdev, i)];
+mapping = EvdevUtilButtonEventToButtonNumber(pEvdev, i);
 if (mapping  num_buttons)
 num_buttons = mapping;
 }


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2009-08-05 Thread Brice Goglin
 configure.ac |2 -
 src/evdev.c  |   97 ++-
 2 files changed, 78 insertions(+), 21 deletions(-)

New commits:
commit bf356d939925b537921e1f82559f92baa3a76bcc
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Aug 6 14:08:55 2009 +1000

evdev 2.2.4

diff --git a/configure.ac b/configure.ac
index c89e356..5090e43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-evdev],
-2.2.3,
+2.2.4,
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 xf86-input-evdev)
 

commit 4c1c4f2c830dbfc34503d8ee4996f5bcd5547b6a
Author: Michael Witten mfwit...@gmail.com
Date:   Tue Aug 4 03:11:49 2009 -0500

evdev.c: Fix/improve discrimination of rel/abs axes

The relevant comment from evdev.c:

We don't allow relative and absolute axes on the same device. The
reason is that some devices (MS Optical Desktop 2000) register both
rel and abs axes for x/y.

The abs axes register min/max; this min/max then also applies to the
relative device (the mouse) and caps it at 0..255 for both axes.
So, unless you have a small screen, you won't be enjoying it much;
consequently, absolute axes are generally ignored.

However, currenly only a device with absolute axes can be registered
as a touch{pad,screen}. Thus, given such a device, absolute axes are
used and relative axes are ignored.

The code for initializing abs/rel axes has been abstracted out into
3 functions, so that initialization in EvdevInit(device) is as easy
as:

if (pEvdev-flags  (EVDEV_TOUCHPAD | EVDEV_TOUCHSCREEN))
EvdevInitTouchDevice(device, pEvdev);
else if (pEvdev-flags  EVDEV_RELATIVE_EVENTS)
EvdevInitRelClass(device, pEvdev);
else if (pEvdev-flags  EVDEV_ABSOLUTE_EVENTS)
EvdevInitAbsClass(device, pEvdev);

Signed-off-by: Michael Witten mfwit...@gmail.com
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit f352598e45be86f9e24d9dba88c657f03f3b168e)

diff --git a/src/evdev.c b/src/evdev.c
index acf2943..9f330e3 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1163,6 +1163,64 @@ EvdevInitButtonMapping(InputInfoPtr pInfo)
 
 }
 
+static void
+EvdevInitAbsClass(DeviceIntPtr device, EvdevPtr pEvdev)
+{
+if (EvdevAddAbsClass(device) == Success) {
+
+xf86Msg(X_INFO,%s: initialized for absolute axes.\n, device-name);
+
+} else {
+
+xf86Msg(X_ERROR,%s: failed to initialize for absolute axes.\n,
+device-name);
+
+pEvdev-flags = ~EVDEV_ABSOLUTE_EVENTS;
+
+}
+}
+
+static void
+EvdevInitRelClass(DeviceIntPtr device, EvdevPtr pEvdev)
+{
+int has_abs_axes = pEvdev-flags  EVDEV_ABSOLUTE_EVENTS;
+
+if (EvdevAddRelClass(device) == Success) {
+
+xf86Msg(X_INFO,%s: initialized for relative axes.\n, device-name);
+
+if (has_abs_axes) {
+
+xf86Msg(X_WARNING,%s: ignoring absolute axes.\n, device-name);
+pEvdev-flags = ~EVDEV_ABSOLUTE_EVENTS;
+}
+
+} else {
+
+xf86Msg(X_ERROR,%s: failed to initialize for relative axes.\n,
+device-name);
+
+pEvdev-flags = ~EVDEV_RELATIVE_EVENTS;
+
+if (has_abs_axes)
+EvdevInitAbsClass(device, pEvdev);
+}
+}
+
+static void
+EvdevInitTouchDevice(DeviceIntPtr device, EvdevPtr pEvdev)
+{
+if (pEvdev-flags  EVDEV_RELATIVE_EVENTS) {
+
+xf86Msg(X_WARNING,%s: touchpads and touchscreens ignore relative 
+axes.\n, device-name);
+
+pEvdev-flags = ~EVDEV_RELATIVE_EVENTS;
+}
+
+EvdevInitAbsClass(device, pEvdev);
+}
+
 static int
 EvdevInit(DeviceIntPtr device)
 {
@@ -1181,28 +1239,27 @@ EvdevInit(DeviceIntPtr device)
EvdevAddKeyClass(device);
 if (pEvdev-flags  EVDEV_BUTTON_EVENTS)
EvdevAddButtonClass(device);
-/* We don't allow relative and absolute axes on the same device. Reason
-   Reason being that some devices (MS Optical Desktop 2000) register both
-   rel and abs axes for x/y.
-   The abs axes register min/max, this min/max then also applies to the
-   relative device (the mouse) and caps it at 0..255 for both axis.
-   So unless you have a small screen, you won't be enjoying it much.
-
-FIXME: somebody volunteer to fix this.
+
+/* We don't allow relative and absolute axes on the same device. The
+ * reason is that some devices (MS Optical Desktop 2000) register both
+ * rel and abs axes for x/y.
+ *
+ * The abs axes register min/max; this min/max then also applies to the
+ * relative device (the mouse) and caps it at 0..255 for both axes.
+ * So, unless you have a small screen, you won't be enjoying it much;
+ * consequently, absolute axes are generally ignored.
+ *
+ * However, currenly only a device with absolute axes can 

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

2009-07-30 Thread Brice Goglin
 configure.ac   |5 +
 man/evdev.man  |2 +-
 src/emuMB.c|6 ++
 src/emuWheel.c |9 -
 src/evdev.c|   57 ++---
 5 files changed, 54 insertions(+), 25 deletions(-)

New commits:
commit c0bee1b4d6d3664322b2f35775675ac84354f702
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Jul 30 11:08:59 2009 +1000

evdev 2.2.3

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

diff --git a/configure.ac b/configure.ac
index 87a3b18..c89e356 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-evdev],
-2.2.2,
+2.2.3,
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 xf86-input-evdev)
 

commit 8acc999d404b9b6012588e2021324553dda9405d
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Jul 30 09:38:31 2009 +1000

Evdev doesn't require inputproto.

None of the inputproto headers seem to be included anywhere.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 6f4634111a83808bc52e7e53733cf2d3bab0cccd)

Conflicts:

configure.ac

diff --git a/configure.ac b/configure.ac
index 3f23d21..87a3b18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,9 +68,6 @@ if test x$BUILD_TEST = xyes; then
 AC_SUBST([DLOPEN_LIBS])
 fi
 
-# Checks for extensions
-XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
-
 # Checks for pkg-config packages. We need to be able to override sdkdir
 # to satisfy silly distcheck requirements.
 PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES)

commit 3cce7fa38a152ba66d379591e6e3ece60bd73fdd
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Fri Jun 26 09:37:29 2009 +1000

If a device fails to initialize relative axes, init the abs. axes instead.

Some devices have relative axes that don't count (scroll wheels). In this
case, don't claim we've initialized relative axes, continue with the
absolute axes instead.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit b07ab6ea97b779b26e7ae8326528c262cc9907a1)

diff --git a/src/evdev.c b/src/evdev.c
index 490fa44..acf2943 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1061,6 +1061,9 @@ EvdevAddRelClass(DeviceIntPtr device)
 if (TestBit(REL_DIAL, pEvdev-rel_bitmask))
 num_axes--;
 
+if (num_axes = 0)
+return !Success;
+
 pEvdev-num_vals = num_axes;
 memset(pEvdev-vals, 0, num_axes * sizeof(int));
 
@@ -1188,12 +1191,17 @@ EvdevInit(DeviceIntPtr device)
 FIXME: somebody volunteer to fix this.
  */
 if (pEvdev-flags  EVDEV_RELATIVE_EVENTS) {
-   EvdevAddRelClass(device);
-if (pEvdev-flags  EVDEV_ABSOLUTE_EVENTS)
-xf86Msg(X_INFO,%s: relative axes found, ignoring absolute 
-   axes.\n, device-name);
-   pEvdev-flags = ~EVDEV_ABSOLUTE_EVENTS;
-} else if (pEvdev-flags  EVDEV_ABSOLUTE_EVENTS)
+if (EvdevAddRelClass(device) == Success)
+{
+if (pEvdev-flags  EVDEV_ABSOLUTE_EVENTS)
+xf86Msg(X_INFO,%s: relative axes found, ignoring absolute 
+axes.\n, device-name);
+pEvdev-flags = ~EVDEV_ABSOLUTE_EVENTS;
+} else
+pEvdev-flags = ~EVDEV_RELATIVE_EVENTS;
+}
+
+if (pEvdev-flags  EVDEV_ABSOLUTE_EVENTS)
 EvdevAddAbsClass(device);
 
 #ifdef HAVE_PROPERTIES

commit c793aa27381dc346d88a3e7d8bdb90dd8d3ed39c
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Mon Jul 20 14:52:34 2009 +1000

Don't register middle mouse button emulation handlers for keyboards.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 2994825665790dc8e35b2944e0d411f3cc9f76fd)

diff --git a/src/emuMB.c b/src/emuMB.c
index 41d0d2c..b29f552 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -327,6 +327,9 @@ EvdevMBEmuPreInit(InputInfoPtr pInfo)
 void
 EvdevMBEmuOn(InputInfoPtr pInfo)
 {
+if (!pInfo-dev-button) /* don't init for keyboards */
+return;
+
 RegisterBlockAndWakeupHandlers (EvdevMBEmuBlockHandler,
 EvdevMBEmuWakeupHandler,
 (pointer)pInfo);
@@ -335,6 +338,9 @@ EvdevMBEmuOn(InputInfoPtr pInfo)
 void
 EvdevMBEmuFinalize(InputInfoPtr pInfo)
 {
+if (!pInfo-dev-button) /* don't cleanup for keyboards */
+return;
+
 RemoveBlockAndWakeupHandlers (EvdevMBEmuBlockHandler,
   EvdevMBEmuWakeupHandler,
   (pointer)pInfo);

commit 9f3632c0b6c181706daf661646de5994217c0bb2
Author: Oliver McFadden oliver.mcfad...@nokia.com
Date:   Thu Jul 16 18:25:37 2009 +0300

Coverity Prevent: NO_EFFECT in EvdevWheelEmuSetProperty:

Event unsigned_compare: Comparing unsigned less than zero is never true. 
pEvdev-emulateWheel.timeout  0UL

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

2009-04-30 Thread Brice Goglin
 configure.ac |2 +-
 src/evdev.c  |   25 +
 2 files changed, 18 insertions(+), 9 deletions(-)

New commits:
commit cf887a2b7cff9eb99c872a9cf5a9382ff6317899
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Apr 30 16:39:15 2009 +1000

evdev 2.2.2

diff --git a/configure.ac b/configure.ac
index 52d892d..3f23d21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-evdev],
-2.2.1,
+2.2.2,
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 xf86-input-evdev)
 

commit 1cc0651e1b44af505d7177b22c6083eae9b118cc
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Apr 16 13:23:50 2009 +1000

Print read errors as X_NONE to avoid mallocs in the server.

Messages of type X_NONE are just passed down to the log files, everything 
else
gets the (EE) or (II) prefixed. Since this mallocs, we can't use it in the
signal handler.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 220e2dfb8f6aa08bd5f59e81c6883c057b945721)

diff --git a/src/evdev.c b/src/evdev.c
index a05bd2c..9fc0663 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -577,15 +577,19 @@ EvdevReadInput(InputInfoPtr pInfo)
 pEvdev-reopen_timer = TimerSet(pEvdev-reopen_timer, 0, 
100, EvdevReopenTimer, pInfo);
 }
 } else if (errno != EAGAIN)
-xf86Msg(X_ERROR, %s: Read error: %s\n, pInfo-name,
+{
+/* We use X_NONE here because it doesn't alloc */
+xf86MsgVerb(X_NONE, 0, %s: Read error: %s\n, pInfo-name,
 strerror(errno));
+}
 break;
 }
 
+/* The kernel promises that we always only read a complete
+ * event, so len != sizeof ev is an error. */
 if (len % sizeof(ev[0])) {
-/* The kernel promises that we always only read a complete
- * event, so len != sizeof ev is an error. */
-xf86Msg(X_ERROR, %s: Read error: %s\n, pInfo-name, 
strerror(errno));
+/* We use X_NONE here because it doesn't alloc */
+xf86MsgVerb(X_NONE, 0, %s: Read error: %s\n, pInfo-name, 
strerror(errno));
 break;
 }
 

commit 48a747ea8603ece6bd25ba5b1ce92c2eb91a7c01
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Thu Apr 16 12:01:03 2009 +1000

Pre-allocate the reopen timer so we don't allocate during sigio handling.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit ddc126637404cb3d9356b7698779dcd8849f8718)

diff --git a/src/evdev.c b/src/evdev.c
index 3a60e7f..a05bd2c 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -571,8 +571,11 @@ EvdevReadInput(InputInfoPtr pInfo)
 xf86RemoveEnabledDevice(pInfo);
 close(pInfo-fd);
 pInfo-fd = -1;
-pEvdev-reopen_left = pEvdev-reopen_attempts;
-pEvdev-reopen_timer = TimerSet(NULL, 0, 100, 
EvdevReopenTimer, pInfo);
+if (pEvdev-reopen_timer)
+{
+pEvdev-reopen_left = pEvdev-reopen_attempts;
+pEvdev-reopen_timer = TimerSet(pEvdev-reopen_timer, 0, 
100, EvdevReopenTimer, pInfo);
+}
 } else if (errno != EAGAIN)
 xf86Msg(X_ERROR, %s: Read error: %s\n, pInfo-name,
 strerror(errno));
@@ -1226,7 +1229,7 @@ EvdevOn(DeviceIntPtr device)
 if (pInfo-fd == -1)
 {
 pEvdev-reopen_left = pEvdev-reopen_attempts;
-pEvdev-reopen_timer = TimerSet(NULL, 0, 100, EvdevReopenTimer, pInfo);
+pEvdev-reopen_timer = TimerSet(pEvdev-reopen_timer, 0, 100, 
EvdevReopenTimer, pInfo);
 } else
 {
 pEvdev-min_maj = EvdevGetMajorMinor(pInfo);
@@ -1237,6 +1240,8 @@ EvdevOn(DeviceIntPtr device)
 return !Success;
 }
 
+pEvdev-reopen_timer = TimerSet(pEvdev-reopen_timer, 0, 0, NULL, 
NULL);
+
 xf86FlushInput(pInfo-fd);
 xf86AddEnabledDevice(pInfo);
 EvdevMBEmuOn(pInfo);

commit aa58eb609617beb5d3199dab262f96003f57ab97
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Mon Apr 6 10:22:25 2009 +1000

Trigger read error handling if len is = 0.

Red Hat Bug 494245 https://bugzilla.redhat.com/show_bug.cgi?id=494245

Reported-by: David Woodhouse dw...@infradead.org
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 98ecb5233bb3b899bd696a90d2733c6a345676dd)

diff --git a/src/evdev.c b/src/evdev.c
index 482f7fd..3a60e7f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -564,7 +564,7 @@ EvdevReadInput(InputInfoPtr pInfo)
 while (len == sizeof(ev))
 {
 len = read(pInfo-fd, ev, sizeof(ev));
-if (len == 0)
+if (len = 0)
 {
 if (errno == ENODEV) /* May happen after resume */
   

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

2009-04-08 Thread Julien Cristau
Rebased ref, commits from common ancestor:
commit aff7228d972eedd556b13f06d8db0b5ffb622b46
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue Mar 24 15:13:23 2009 +1000

evdev 2.2.1

diff --git a/configure.ac b/configure.ac
index c1549eb..52d892d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-evdev],
-2.2.0,
+2.2.1,
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 xf86-input-evdev)
 

commit c695234c5c5fd54a6afd12db46a0926ccdd83301
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue Mar 17 14:08:29 2009 +1000

Fix jumpy touchpads by updating old_vals only when reported by the device.

Remember whether ABS_X or ABS_Y were reported before the SYN event and only
update the old_vals[0, 1] if we got data for them.
Touchpads that reported pressure data before x/y would otherwise update
old_x/y with bogus values, leading to jumps when the first x/y coordinates
were actually reported.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit d9809d7edd2be714a15115b990286554e2979fb6)

diff --git a/src/evdev.c b/src/evdev.c
index 1d34827..482f7fd 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -342,6 +342,9 @@ EvdevReopenTimer(OsTimerPtr timer, CARD32 time, pointer arg)
 return 100; /* come back in 100 ms */
 }
 
+#define ABS_X_VALUE 0x1
+#define ABS_Y_VALUE 0x2
+#define ABS_VALUE   0x4
 /**
  * Take one input event and process it accordingly.
  */
@@ -392,7 +395,12 @@ EvdevProcessEvent(InputInfoPtr pInfo, struct input_event 
*ev)
 if (ev-code  ABS_MAX)
 break;
 pEvdev-vals[pEvdev-axis_map[ev-code]] = value;
-abs = 1;
+if (ev-code == ABS_X)
+abs |= ABS_X_VALUE;
+else if (ev-code == ABS_Y)
+abs |= ABS_Y_VALUE;
+else
+abs |= ABS_VALUE;
 break;
 
 case EV_KEY:
@@ -443,18 +451,20 @@ EvdevProcessEvent(InputInfoPtr pInfo, struct input_event 
*ev)
 case EV_SYN:
 /* convert to relative motion for touchpads */
 if (abs  (pEvdev-flags  EVDEV_TOUCHPAD)) {
-abs = 0;
-rel = 1;
 if (pEvdev-tool) { /* meaning, touch is active */
 if (pEvdev-old_vals[0] != -1)
 delta[REL_X] = pEvdev-vals[0] - pEvdev-old_vals[0];
 if (pEvdev-old_vals[1] != -1)
 delta[REL_Y] = pEvdev-vals[1] - pEvdev-old_vals[1];
-pEvdev-old_vals[0] = pEvdev-vals[0];
-pEvdev-old_vals[1] = pEvdev-vals[1];
+if (abs  ABS_X_VALUE)
+pEvdev-old_vals[0] = pEvdev-vals[0];
+if (abs  ABS_Y_VALUE)
+pEvdev-old_vals[1] = pEvdev-vals[1];
 } else {
 pEvdev-old_vals[0] = pEvdev-old_vals[1] = -1;
 }
+abs = 0;
+rel = 1;
 }
 
 if (rel) {
@@ -537,6 +547,10 @@ EvdevProcessEvent(InputInfoPtr pInfo, struct input_event 
*ev)
 }
 }
 
+#undef ABS_X_VALUE
+#undef ABS_Y_VALUE
+#undef ABS_VALUE
+
 /* just a magic number to reduce the number of reads */
 #define NUM_EVENTS 16
 

commit 79d4956add44d1150e835cbb0d44d3d1c9077203
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue Mar 17 13:25:58 2009 +1000

If we have a touchpad, print so, don't claim we're configuring a tablet.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit b11439a1763b5f210460b492dd4f47e973f90a3a)

diff --git a/src/evdev.c b/src/evdev.c
index 6aafce2..1d34827 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1505,7 +1505,10 @@ EvdevProbe(InputInfoPtr pInfo)
 if (has_axes  num_buttons) {
 pInfo-flags |= XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS |
 XI86_CONFIGURED;
-if (TestBit(ABS_PRESSURE, pEvdev-abs_bitmask)) {
+   if (pEvdev-flags  EVDEV_TOUCHPAD) {
+   xf86Msg(X_INFO, %s: Configuring as touchpad\n, pInfo-name);
+   pInfo-type_name = XI_TOUCHPAD;
+   } else if (TestBit(ABS_PRESSURE, pEvdev-abs_bitmask)) {
xf86Msg(X_INFO, %s: Configuring as tablet\n, pInfo-name);
pInfo-type_name = XI_TABLET;
} else {

commit 7e9809837c41a9ad0822a9bbc59362a3ba96
Author: Jeremy Jay dinkuma...@gmail.com
Date:   Mon Mar 16 23:19:54 2009 -0400

make sure to clear all axis_map entries

don't use uninitialized axis_map entries, ie axis_map[ABS_PRESSURE]

Signed-off-by: Jeremy Jay dinkuma...@gmail.com
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 740dc202f735106532dce581deabe2b95c52759f)

diff --git a/src/evdev.c b/src/evdev.c
index 6ec7374..6aafce2 100644
--- a/src/evdev.c
+++ b/src/evdev.c

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

2009-04-08 Thread Julien Cristau
Rebased ref, commits from common ancestor:
commit 11d506dce6363525e80eda219aee8af429fb302e
Author: Peter Hutterer peter.hutte...@who-t.net
Date:   Tue Jan 13 11:32:05 2009 +1000

evdev 2.1.1

diff --git a/configure.ac b/configure.ac
index f668d1e..28294e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-evdev],
-2.1.0,
+2.1.1,
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 xf86-input-evdev)
 

commit a34a2cd3476441f29c9faa79ffa9289dbf2eebf4
Author: Michael Chapman m...@very.puzzling.org
Date:   Fri Jan 9 19:07:10 2009 +1100

Disable middle mouse button emulation when a middle mouse button event is 
registered

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 0592d97fbb5a1241ee79397ce9203346d050a9f9)

diff --git a/src/emuMB.c b/src/emuMB.c
index e5a767a..028d27f 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -231,6 +231,11 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL 
press)
 if (!pEvdev-emulateMB.enabled)
 return ret;
 
+if (button == 2) {
+EvdevMBEmuEnable(pInfo, FALSE);
+return ret;
+}
+
 /* don't care about other buttons */
 if (button != 1  button != 3)
 return ret;

commit 78c00bd77f983aa22611c9966fbcb7e22453b588
Author: Matt Helsley matt.hels...@gmail.com
Date:   Tue Jan 13 11:03:04 2009 +1000

Fix FOO_MAX off-by-one

In linux/input.h each section's (e.g. ABS) FOO_MAX is the maximum FOO
value. Recent kernels define FOO_CNT as the maximum number of FOO there
will ever be. Hence using FOO_MAX to size the bit vectors representing
the capabilities of an evdev device is off by one.

Define FOO_CNT values for use with Linux kernels which lack them. Use
FOO_CNT whenever we need to know the number of bits needed -- usually to
calculate the number of longs needed.

When iterating over the values FOO_MAX still seems appropriate however
the loop test should include FOO_MAX rather than skip it.

Signed-off-by: Matt Helsley matt.hels...@gmail.com
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
(cherry picked from commit 4dfd86b2201b2b19761a1abb3c580cecf0060224)

Conflicts:

src/evdev.c

diff --git a/src/evdev.c b/src/evdev.c
index e48edd9..5601caa 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -236,7 +236,7 @@ static void
 PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
 {
 int code = ev-code + MIN_KEYCODE;
-static char warned[KEY_MAX];
+static char warned[KEY_CNT];
 
 /* filter repeat events for chording keys */
 if (value == 2 
@@ -248,7 +248,7 @@ PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, 
int value)
  ev-code == KEY_SCROLLLOCK)) /* XXX windows keys? */
 return;
 
-if (code  255  ev-code  KEY_MAX) {
+if (code  255  ev-code = KEY_MAX) {
if (!warned[ev-code])
xf86Msg(X_WARNING, %s: unable to handle keycode %d\n,
pInfo-name, ev-code);
@@ -1202,12 +1202,12 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
 int i;
 
 char name[1024]  = {0};
-long bitmask[NLONGS(EV_MAX)]  = {0};
-long key_bitmask[NLONGS(KEY_MAX)] = {0};
-long rel_bitmask[NLONGS(REL_MAX)] = {0};
-long abs_bitmask[NLONGS(ABS_MAX)] = {0};
-long led_bitmask[NLONGS(LED_MAX)] = {0};
-struct input_absinfo absinfo[ABS_MAX];
+long bitmask[NLONGS(EV_CNT)]  = {0};
+long key_bitmask[NLONGS(KEY_CNT)] = {0};
+long rel_bitmask[NLONGS(REL_CNT)] = {0};
+long abs_bitmask[NLONGS(ABS_CNT)] = {0};
+long led_bitmask[NLONGS(LED_CNT)] = {0};
+struct input_absinfo absinfo[ABS_CNT];
 
 if (ioctl(pInfo-fd,
   EVIOCGNAME(sizeof(name) - 1), name)  0) {
@@ -1266,7 +1266,7 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
 
 memset(absinfo, 0, sizeof(absinfo));
 
-for (i = 0; i  ABS_MAX; i++)
+for (i = ABS_X; i = ABS_MAX; i++)
 {
 if (TestBit(i, abs_bitmask))
 {
@@ -1302,9 +1302,9 @@ error:
 static int
 EvdevProbe(InputInfoPtr pInfo)
 {
-long key_bitmask[NLONGS(KEY_MAX)] = {0};
-long rel_bitmask[NLONGS(REL_MAX)] = {0};
-long abs_bitmask[NLONGS(ABS_MAX)] = {0};
+long key_bitmask[NLONGS(KEY_CNT)] = {0};
+long rel_bitmask[NLONGS(REL_CNT)] = {0};
+long abs_bitmask[NLONGS(ABS_CNT)] = {0};
 int i, has_axes, has_keys, num_buttons;
 int kernel24 = 0;
 EvdevPtr pEvdev = pInfo-private;
diff --git a/src/evdev.h b/src/evdev.h
index 107dc77..cdbc87d 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -40,6 +40,22 @@
 #include xkbstr.h
 #endif
 
+#ifndef EV_CNT /* linux 2.4 kernels and earlier lack _CNT defines */
+#define EV_CNT (EV_MAX+1)
+#endif
+#ifndef KEY_CNT
+#define KEY_CNT (KEY_MAX+1)
+#endif
+#ifndef REL_CNT
+#define REL_CNT (REL_MAX+1)
+#endif
+#ifndef ABS_CNT
+#define ABS_CNT (ABS_MAX+1)

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

2008-11-27 Thread Julien Cristau
 configure.ac  |2 
 man/evdev.man |5 +
 src/evdev.c   |  289 +-
 src/evdev.h   |   16 +++
 4 files changed, 288 insertions(+), 24 deletions(-)

New commits:
commit 891bfc56be3c45d085f4b6abd5bd265e82b8c353
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Tue Nov 18 17:16:33 2008 +1000

evdev 2.0.8

Expect this to be the last 2.0.x release.

diff --git a/configure.ac b/configure.ac
index 900cbb4..5f8b565 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-evdev],
-2.0.7,
+2.0.8,
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 xf86-input-evdev)
 

commit 6626ad5cb9a9fab9bd3c3d8a36d8b09b8cb037a0
Author: Julien Cristau [EMAIL PROTECTED]
Date:   Tue Oct 21 19:21:21 2008 +0200

Fix TestBit() on 64bit

Reported by Albert Damen [EMAIL PROTECTED]
X.Org Bug#18150 http://bugs.freedesktop.org/show_bug.cgi?id=18150
(cherry picked from commit f57e8face94c9e6986b35ca2ec231e284b9f58cf)

diff --git a/src/evdev.c b/src/evdev.c
index 3d7a76f..d186be0 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -381,7 +381,7 @@ EvdevReadInput(InputInfoPtr pInfo)
 }
 }
 
-#define TestBit(bit, array) (array[(bit) / LONG_BITS])  (1  ((bit) % 
LONG_BITS))
+#define TestBit(bit, array) (array[(bit) / LONG_BITS])  (1L  ((bit) % 
LONG_BITS))
 
 static void
 EvdevPtrCtrlProc(DeviceIntPtr device, PtrCtrl *ctrl)

commit ae247ff09cb77d8e6ebc4505b44731e32b3a179b
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Fri Oct 17 11:42:21 2008 +1030

evdev 2.0.7

diff --git a/configure.ac b/configure.ac
index e7198da..900cbb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-evdev],
-2.0.6,
+2.0.7,
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 xf86-input-evdev)
 

commit 46f2b83e0130da2260559ad63f75dbf9c00bb83c
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Thu Oct 16 22:35:42 2008 +1030

Don't post keycodes  255.

If we only have keys  255 we don't set up a key class rec, so don't post
them. It makes the server unhappy.

Signed-off-by: Julien Cristau [EMAIL PROTECTED]
(cherry picked from commit 7243116f55609a2a5f73bb88cf6ad6386c9bbc0b)

diff --git a/src/evdev.c b/src/evdev.c
index 019d70d..3d7a76f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -155,6 +155,10 @@ PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, 
int value)
warned[ev-code] = 1;
 }
 
+/* The X server can't handle keycodes  255 anyway, just drop them.  */
+if (code  255)
+return;
+
 xf86PostKeyboardEvent(pInfo-dev, code, value);
 }
 

commit d73a1732c6a2c093f76bdc5f32b3a53fdef92b15
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Tue Oct 14 17:02:43 2008 +1030

Fix Device reopened after N attempts message.
(cherry picked from commit 0089d931ac5fb290c82908da652b28c8b515d449)

diff --git a/src/evdev.c b/src/evdev.c
index 6958578..019d70d 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -176,12 +176,10 @@ EvdevReopenTimer(OsTimerPtr timer, CARD32 time, pointer 
arg)
 
 if (pInfo-fd != -1)
 {
-pEvdev-reopen_left = 0;
-
 if (EvdevCacheCompare(pInfo, TRUE) == Success)
 {
 xf86Msg(X_INFO, %s: Device reopened after %d attempts.\n, 
pInfo-name,
-pEvdev-reopen_attempts - pEvdev-reopen_left);
+pEvdev-reopen_attempts - pEvdev-reopen_left + 1);
 EvdevOn(pInfo-dev);
 } else
 {
@@ -191,6 +189,7 @@ EvdevReopenTimer(OsTimerPtr timer, CARD32 time, pointer arg)
 close(pInfo-fd);
 pInfo-fd = -1;
 }
+pEvdev-reopen_left = 0;
 return 0;
 }
 

commit 8c332a836783b4f18b992253f4a94b694c9d0cf1
Author: Julien Cristau [EMAIL PROTECTED]
Date:   Sat Oct 11 02:10:48 2008 +0200

Set pInfo-fd to -1 on DEVICE_CLOSE

This allows the reopen logic to kick in later.
DEVICE_CLOSE gets called on regen, so without this we'd keep a stale
file descriptor in pInfo-fd in subsequent sessions.

Debian bug#496101 (http://bugs.debian.org/496101)
(cherry picked from commit b0b6399023bcdbb3337027f85c8da42d8b18c983)

diff --git a/src/evdev.c b/src/evdev.c
index b12f2ff..6958578 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -986,8 +986,10 @@ EvdevProc(DeviceIntPtr device, int what)
 
 case DEVICE_CLOSE:
xf86Msg(X_INFO, %s: Close\n, pInfo-name);
-if (pInfo-fd != -1)
+if (pInfo-fd != -1) {
 close(pInfo-fd);
+pInfo-fd = -1;
+}
break;
 }
 

commit 91e30bb07cadb41c99b0515d8ecb49f7b045e90c
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Thu Oct 2 12:05:14 2008 +0930

evdev 2.0.6

diff --git a/configure.ac b/configure.ac
index f465f06..e7198da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 

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

2008-08-04 Thread Julien Cristau
 configure.ac |2 +-
 src/evdev.c  |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ef607b6cce8e1feb6632c6bc1e7f322095ce54d9
Author: Julien Cristau [EMAIL PROTECTED]
Date:   Mon Aug 4 09:16:53 2008 +0930

Actually close the fd on DEVICE_CLOSE (bug#16948)

Fixes file descriptor leak.

Signed-off-by: Peter Hutterer [EMAIL PROTECTED]
(cherry picked from commit d9097df01b01afaf946fa04fca8ae8ab7108ff21)

diff --git a/src/evdev.c b/src/evdev.c
index 45b0e5d..164346a 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -864,6 +864,7 @@ EvdevProc(DeviceIntPtr device, int what)
 
 case DEVICE_CLOSE:
xf86Msg(X_INFO, %s: Close\n, pInfo-name);
+   close(pInfo-fd);
break;
 }
 

commit 906a5d6add75d3bf3077d0542352534256b734d4
Author: Julien Cristau [EMAIL PROTECTED]
Date:   Wed Jul 30 10:40:47 2008 +0200

Print the device name when we get a read error
(cherry picked from commit 5c074af5a9abba138023e3bc6954d1062f7c36dd)

diff --git a/src/evdev.c b/src/evdev.c
index 0cd016a..45b0e5d 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -162,7 +162,7 @@ EvdevReadInput(InputInfoPtr pInfo)
 if (len != sizeof ev) {
 /* The kernel promises that we always only read a complete
  * event, so len != sizeof ev is an error. */
-xf86Msg(X_ERROR, Read error: %s\n, strerror(errno));
+xf86Msg(X_ERROR, %s: Read error: %s\n, pInfo-name, 
strerror(errno));
 break;
 }
 

commit 5152d616cab6912a45e09c37c0330064d2f412f2
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Fri Aug 1 17:29:24 2008 +0930

evdev 2.0.3

diff --git a/configure.ac b/configure.ac
index c9a58c8..251c431 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-evdev],
-2.0.2,
+2.0.3,
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 xf86-input-evdev)
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2008-07-30 Thread Julien Cristau
 src/evdev.c |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 2e9a71df5f8e8cdcdb80eec9e17501a75d5bd669
Author: Michel Dänzer [EMAIL PROTECTED]
Date:   Tue Jul 29 10:06:07 2008 +0200

xf86-input-evdev: Fix EVIOCGBIT ioctl usage on big endian platforms.

With this fix, on my PowerBook HAL hotplugging correctly detects my USB 
mouse,
and no longer thinks keyboards have random numbers of mouse buttons. :)

The LONG_BITS and NBITS macro definitions are stolen from 
xf86-input-synaptics.

Signed-off-by: Michel Dänzer [EMAIL PROTECTED]
Signed-off-by: Peter Hutterer [EMAIL PROTECTED]
[cherry-picked from master and fixed the trivial conflict -- jcristau]

diff --git a/src/evdev.c b/src/evdev.c
index f9c6fde..0cd016a 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -306,7 +306,9 @@ EvdevReadInput(InputInfoPtr pInfo)
 }
 }
 
-#define TestBit(bit, array) (array[(bit) / 8]  (1  ((bit) % 8)))
+#define LONG_BITS (sizeof(long) * 8)
+#define NBITS(x) (((x) + LONG_BITS - 1) / LONG_BITS)
+#define TestBit(bit, array) (array[(bit) / LONG_BITS])  (1  ((bit) % 
LONG_BITS))
 
 static void
 EvdevPtrCtrlProc(DeviceIntPtr device, PtrCtrl *ctrl)
@@ -895,9 +897,9 @@ EvdevConvert(InputInfoPtr pInfo, int first, int num, int 
v0, int v1, int v2,
 static int
 EvdevProbe(InputInfoPtr pInfo)
 {
-char key_bitmask[(KEY_MAX + 7) / 8];
-char rel_bitmask[(REL_MAX + 7) / 8];
-char abs_bitmask[(ABS_MAX + 7) / 8];
+long key_bitmask[NBITS(KEY_MAX)];
+long rel_bitmask[NBITS(REL_MAX)];
+long abs_bitmask[NBITS(ABS_MAX)];
 int i, has_axes, has_buttons, has_keys;
 EvdevPtr pEvdev = pInfo-private;
 

commit 49de32e70f833628554342ef4225a4174158b412
Author: Julien Cristau [EMAIL PROTECTED]
Date:   Sun Jul 20 11:33:37 2008 +0200

Fill up the version info

Report correct versions instead of
compiled for 0.0.0, module version = 1.0.0
(cherry picked from commit 2b7edaa4ab88e192d7285d39b4834d1e535b94d0)

diff --git a/src/evdev.c b/src/evdev.c
index 471bb51..f9c6fde 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -42,6 +42,7 @@
 #include xf86Xinput.h
 #include exevents.h
 #include mipointer.h
+#include xorgVersion.h
 
 #include evdev.h
 
@@ -1101,8 +1102,8 @@ static XF86ModuleVersionInfo EvdevVersionRec =
 MODULEVENDORSTRING,
 MODINFOSTRING1,
 MODINFOSTRING2,
-0, /* Missing from SDK: XORG_VERSION_CURRENT, */
-1, 0, 0,
+XORG_VERSION_CURRENT,
+PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
 ABI_CLASS_XINPUT,
 ABI_XINPUT_VERSION,
 MOD_CLASS_XINPUT,


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2008-07-18 Thread Julien Cristau
 .gitignore   |   26 ++
 ChangeLog|   47 ---
 Makefile.am  |   12 
 configure.ac |2 +-
 src/evdev.c  |   22 --
 5 files changed, 55 insertions(+), 54 deletions(-)

New commits:
commit f135e074629c7cba01bbe9ff6bce77883c22bb29
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Mon Jul 14 13:34:36 2008 +0930

evdev 2.0.2

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

commit e926356eb0dfd218e88d47d8ed1e3ccfb2f1c85a
Author: Peter Hutterer [EMAIL PROTECTED](none)
Date:   Mon Jul 14 13:06:32 2008 +0930

Don't enable the device if the grab failed with ENODEV.

After suspend/resume, sometimes the device doesn't come back up on the same
node. Since we do not call PreInit for the device (which would detect this
situation), we continue to try to read a nonexisting file, spamming the log
file with Read Error.
(cherry picked from commit bf0d81011e19a8bb5bbd80c6b496c8ae257b4f2c)

diff --git a/src/evdev.c b/src/evdev.c
index da6fa3b..471bb51 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -841,12 +841,15 @@ EvdevProc(DeviceIntPtr device, int what)
 if (!pEvdev-kernel24  ioctl(pInfo-fd, EVIOCGRAB, (void *)1))
 xf86Msg(X_WARNING, %s: Grab failed (%s)\n, pInfo-name,
 strerror(errno));
-xf86AddEnabledDevice(pInfo);
-   if (pEvdev-flags  EVDEV_BUTTON_EVENTS)
-   EvdevMBEmuPreInit(pInfo);
-   device-public.on = TRUE;
+if (errno != ENODEV)
+{
+xf86AddEnabledDevice(pInfo);
+if (pEvdev-flags  EVDEV_BUTTON_EVENTS)
+EvdevMBEmuPreInit(pInfo);
+device-public.on = TRUE;
+}
break;
-   
+
 case DEVICE_OFF:
 if (!pEvdev-kernel24  ioctl(pInfo-fd, EVIOCGRAB, (void *)0))
 xf86Msg(X_WARNING, %s: Release failed (%s)\n, pInfo-name,

commit bd56ab3d72c7baafd2ecd27cdadcef333fb39262
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Thu Jul 10 19:32:22 2008 +0930

Add .gitignore file.
(cherry picked from commit ef4bb69c1a64e784fef1c758ee439372ba329b0a)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..38eebd9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,26 @@
+*.patch
+ChangeLog
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+libtool
+ltmain.sh
+man/evdev.4
+missing
+.deps
+.libs
+*.lo
+*.la
+stamp-h1
+*.bz2
+*.gz

commit 2b30413598663b75acff0cafb21c2e3d8a727c9a
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Thu Jul 3 15:01:32 2008 +0930

Remove static ChangeLog, autogenerate as part of make dist.

Hook taken from xserver's Makefile.am
(cherry picked from commit ec23c6b2f550f2679226da907c1d022295d453f1)

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 2c448ae..000
--- a/ChangeLog
+++ /dev/null
@@ -1,47 +0,0 @@
-2006-01-09  David Nusinow,,,  set EMAIL_ADDRESS environment variable
-
-   * man/Makefile.am:
-   * man/evdev.man:
-   Bugzilla #968 https://bugs.freedesktop.org/show_bug.cgi?id=968
-   Patch #4301 https://bugs.freedesktop.org/attachment.cgi?id=4301
-   Add evdev manpage
-
-2005-12-20  Kevin E. Martin  kem-at-freedesktop-dot-org
-
-   * configure.ac:
-   Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  kem-at-freedesktop-dot-org
-
-   * configure.ac:
-   Update package version number for final X11R7 release candidate.
-
-2005-12-06  Kevin E. Martin  kem-at-freedesktop-dot-org
-
-   * man/Makefile.am:
-   Change *man_SOURCES == *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  kem-at-freedesktop-dot-org
-
-   * configure.ac:
-   Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  kem-at-freedesktop-dot-org
-
-   * configure.ac:
-   Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  [EMAIL PROTECTED]
-
-   * configure.ac:
-   Only build dlloader modules by default.
-
-2005-11-09  Kevin E. Martin  kem-at-freedesktop-dot-org
-
-   * configure.ac:
-   Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  kem-at-freedesktop-dot-org
-
-   * configure.ac:
-   Update pkgcheck dependencies to work with separate build roots.
diff --git a/Makefile.am b/Makefile.am
index 7052905..11064e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,3 +20,15 @@
 
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = src man
+
+EXTRA_DIST = ChangeLog autogen.sh
+
+MAINTAINERCLEANFILES=ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+   

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

2008-07-13 Thread Julien Cristau
 .cvsignore   |   19 
 .gitignore   |   25 -
 ChangeLog|   47 +
 Makefile.am  |   11 
 configure.ac |5 
 man/.cvsignore   |2 
 man/.gitignore   |3 
 man/evdev.man|  323 +
 src/.cvsignore   |6 
 src/.gitignore   |6 
 src/Makefile.am  |5 
 src/emuMB.c  |  334 +
 src/evdev.c  | 1330 ++-
 src/evdev.h  |  323 ++---
 src/evdev_axes.c |  930 --
 src/evdev_btn.c  |  477 ---
 src/evdev_key.c  |  549 --
 17 files changed, 1441 insertions(+), 2954 deletions(-)

New commits:
commit b125b834f4ce4877204b9c8e98ad2641e2c7b082
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Sun Jun 22 17:52:58 2008 +0930

evdev 2.0.1

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

commit 05b20db8dbfb47bc370fe24e50ef563f1879be61
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Sat Jun 21 16:42:12 2008 +0930

No need to finalize MB emulation after EvdevProbe anymore.

Follow-up to 76800bfa75807e49398380b902f6c0f547cd4c0e.
(cherry picked from commit 5a0ea39b79b27b7c3117661a21e7ab5eba3c9b24)

diff --git a/src/evdev.c b/src/evdev.c
index f029e8b..0078881 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1052,7 +1052,6 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 /* parse the XKB options during kbd setup */
 
 if (EvdevProbe(pInfo)) {
-   EvdevMBEmuFinalize(pInfo);
close(pInfo-fd);
xf86DeleteInput(pInfo, 0);
 return NULL;

commit 43768d59da2c519dde5a8efaf0ff2b12b6c47fcc
Author: Simon Munton [EMAIL PROTECTED]
Date:   Sat Jun 21 10:19:07 2008 +0930

Close file descriptor if EvdevProbe fails.

Signed-off-by: Peter Hutterer [EMAIL PROTECTED]
(cherry picked from commit 373e13ae353d1e0022f8821adc528ebc5411d47d)

diff --git a/src/evdev.c b/src/evdev.c
index fa0545f..f029e8b 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1053,6 +1053,7 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 
 if (EvdevProbe(pInfo)) {
EvdevMBEmuFinalize(pInfo);
+   close(pInfo-fd);
xf86DeleteInput(pInfo, 0);
 return NULL;
 }

commit 9c524f6963645bf42bbd41d4189d6319020a133d
Author: Keith Packard [EMAIL PROTECTED]
Date:   Fri Jun 20 18:20:55 2008 -0700

Enable middle button emulation at DEVICE_ON instead of DEVICE_INIT.

This ensures that the middle button emulation is re-enabled after VT switch,
otherwise the block handler that deals with the timeouts would not get
re-registered.

Signed-off-by: Keith Packard [EMAIL PROTECTED]
(cherry picked from commit 76800bfa75807e49398380b902f6c0f547cd4c0e)

diff --git a/src/evdev.c b/src/evdev.c
index 65b7185..fa0545f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -835,6 +835,8 @@ EvdevProc(DeviceIntPtr device, int what)
 xf86Msg(X_WARNING, %s: Grab failed (%s)\n, pInfo-name,
 strerror(errno));
 xf86AddEnabledDevice(pInfo);
+   if (pEvdev-flags  EVDEV_BUTTON_EVENTS)
+   EvdevMBEmuPreInit(pInfo);
device-public.on = TRUE;
break;

@@ -941,7 +943,6 @@ EvdevProbe(InputInfoPtr pInfo)
 
 if (TestBit(BTN_LEFT, key_bitmask)) {
 xf86Msg(X_INFO, %s: Found mouse buttons\n, pInfo-name);
-   EvdevMBEmuPreInit(pInfo);
pEvdev-flags |= EVDEV_BUTTON_EVENTS;
has_buttons = TRUE;
 }

commit 04003a98a9ca1b4b0c32d319fab07ee7afc83c75
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Tue Jun 17 14:01:49 2008 +0930

evdev 2.0.0

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

commit 0443fb430f2481c1f0d0d83730a9145b5794f559
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Tue Jun 17 13:59:15 2008 +0930

Shut up compiler warning implicit declaration of function 'xf86Msg'

diff --git a/src/emuMB.c b/src/emuMB.c
index f24a721..5def36b 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -34,6 +34,8 @@
 #include config.h
 #endif
 
+#include xf86.h
+
 #include evdev.h
 
 enum {

commit 998f52010f92dc79f2ace6048a2f3fd600a97582
Author: Peter Hutterer [EMAIL PROTECTED]
Date:   Thu Jun 12 11:23:10 2008 +0930

Finalize MB emulation if EvdevProbe fails.

This avoids segfaults when HAL is restarted behind our backs. Also, only 
init
MB emulation when the device actually has a button.

diff --git a/src/evdev.c b/src/evdev.c
index 4d20b76..65b7185 100644
--- 

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

2007-12-06 Thread Julien Cristau
 .gitignore |1 
 configure.ac   |2 
 man/evdev.man  |  121 ---
 src/Makefile.am|2 
 src/evdev.c|  458 +++
 src/evdev.h|  245 ++
 src/evdev_axes.c   |  810 +++--
 src/evdev_brain.c  |  505 --
 src/evdev_btn.c|  354 +++--
 src/evdev_key.c|  209 
 src/inotify-syscalls.h |   83 -
 src/inotify.h  |   60 ---
 12 files changed, 1305 insertions(+), 1545 deletions(-)

New commits:
commit fa15e909933252d5cc0a2a272506effbcf21d6f9
Author: Peter Samuelson [EMAIL PROTECTED]
Date:   Thu Oct 11 07:27:30 2007 +0200

Fix one additional typo in evdev.man (axis named BRAKE, not BREAK).

diff --git a/man/evdev.man b/man/evdev.man
index 3026efe..2a11945 100644
--- a/man/evdev.man
+++ b/man/evdev.man
@@ -253,7 +253,7 @@ and map the Wheel axis to buttons 4 5, you get buttons 1 2 3
 .SS ABSOLUTE AXIS CONFIGURATION
 The relative axis portion of this driver handle all reported relative axes.
 .fi
-The axes are named X, Y, Z, RX, RY, RZ, THROTTLE, RUDDER, WHEEL, GAS, BREAK,
+The axes are named X, Y, Z, RX, RY, RZ, THROTTLE, RUDDER, WHEEL, GAS, BRAKE,
 11\-15, HAT0X, HAT0Y, HAT1X, HAT1Y, HAT2X, HAT2Y, HAT3X, HAT3Y, PRESSURE,
 TILT_X, TILT_Y, TOOL_WIDTH, VOLUME, 29\-39, MISC, 41\-62.
 .fi

commit 12a27693b9bb41b9222c5c2256815d225ee75929
Author: Peter Samuelson [EMAIL PROTECTED]
Date:   Thu Oct 11 00:09:40 2007 +0200

evdev.man minor fixes

* Use \- (ASCII dash) instead of - (hyphen), where appropriate
* Use a roff escape instead of a UTF-8 character.
* Consistent use of quote characters.
* Consistent use of typographic conventions:
  italic n in place of N or integer or number,
  bold for option names, bit maps, etc.

Debian bug #446118

diff --git a/man/evdev.man b/man/evdev.man
index 2395cd8..3026efe 100644
--- a/man/evdev.man
+++ b/man/evdev.man
@@ -14,7 +14,7 @@ evdev \- Generic Linux input driver
 .fi
 .SH DESCRIPTION
 .B evdev 
-is an __xservername__ input driver for Linux\'s generic event devices.  It
+is an __xservername__ input driver for Linux's generic event devices.  It
 therefore supports all input devices that the kernel knows about, including
 most mice and keyboards.
 .PP
@@ -46,7 +46,7 @@ all QWERTY keyboards:
 .BI   Identifier \*q keyboard \*q
 .BDriver \*qevdev\*q
 .BIOption \*qevBits\*q  \*q +1 \*q
-.BIOption \*qkeyBits\*q \*q ~1-255 ~352-511 \*q
+.BIOption \*qkeyBits\*q \*q ~1\-255 ~352\-511 \*q
 .BIOption \*qPass\*q\*q 3 \*q
 \ \ ...
 .B EndSection
@@ -58,9 +58,9 @@ And the following for all mice:
 .B Section \*qInputDevice\*q
 .BI   Identifier \*q mouse \*q
 .BDriver \*qevdev\*q
-.BIOption \*qevBits\*q  \*q +1-2 \*q
-.BIOption \*qkeyBits\*q \*q ~272-287 \*q
-.BIOption \*qrelBits\*q \*q ~0-2 ~6 ~8 \*q
+.BIOption \*qevBits\*q  \*q +1\-2 \*q
+.BIOption \*qkeyBits\*q \*q ~272\-287 \*q
+.BIOption \*qrelBits\*q \*q ~0\-2 ~6 ~8 \*q
 .BIOption \*qPass\*q\*q 3 \*q
 \ \ ...
 .B EndSection
@@ -86,8 +86,11 @@ control what devices are accepted:
 .TP 7
 .BI Option \*qDevice\*q \*q string \*q
 Specifies the device note through which the device can be accessed.
-At this time ONLY /dev/input/eventN, where N is an integer, are
-matched against this this field.
+At this time ONLY
+.RI /dev/input/event n ,
+where
+.I n
+is an integer, are matched against this this field.
 .fi
 This option uses globbing.
 .fi
@@ -120,25 +123,29 @@ is the value you want for this option.
 This option uses globbing.
 
 .TP 7
-.BI Option \*qmapBits\*q \*q bit specifier \*q
+.BI Option \*q map Bits\*q \*q bit specifier \*q
 Specifies device capability bits which must be set, possibly set, or unset.
 .fi
-mapBits: Where map is one of ev, key, rel, abs, msc, led, snd, or
-ff.
+.IR map Bits: Where  map
+is one of
+.BR ev ,  key ,  rel ,  abs ,
+.BR msc ,  led ,  snd , or  ff .
 .fi
-The bit specifier format is a string consisting of +n, -n, and ~n
-space separated specifiers, where n is a positive integer or integer range.
-(The latter given in the format of 2-6.)
+The bit specifier format is a string consisting of
+.RI + n , \- n , and ~ n
+space-separated specifiers, where
+.I n
+is a positive integer or integer range.  (The latter given in the format of 
2\-6.)
 .fi
 + specifies bits which must be set.
 .fi
-- specifies bits which must not be set.
+\- specifies bits which must not be set.
 .fi
 ~ is a little more complex, it specifies that at least one of the bits given
 with ~ for the field in question must be set, but it doesn't matter how many
 or which of the bits. (It is actually the most useful of the 3 specifiers.)
 .fi
-As an example '+0 +3 -1-2 ~5-10', requires bits 0 and 3 be set,
+As an example, \*q+0 +3 \-1\-2 ~5\-10\*q requires bits 0 and 3 be set,
 bits 1 and 2 to not be set, and at least one 

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

2007-01-28 Thread David Nusinow
New branch 'upstream-unstable' available with the following commits:
commit d8d8f114caece4c26c777ae6eee57e66b1f499e7
Author: root [EMAIL PROTECTED]
Date:   Wed Jan 17 19:27:40 2007 -0500

For reasons related to handling pathological remapping cases, and
differences between HID and X, pretend a middle button exists
whenever a right button exists.

commit ebb30a554fe084a50c7281defea80c38bc1b0ddd
Author: root [EMAIL PROTECTED]
Date:   Sat Jan 13 07:33:49 2007 -0500

Fix a bug where we potentially wrote garbage events when LEDs change.

Support setting keyboard repeat rate/period.

commit 3d8bb262e42b1c5442aebb4048c71b4dc8ce24a0
Author: root [EMAIL PROTECTED]
Date:   Thu Jan 11 22:42:19 2007 -0500

Handle swapping of right and middle buttons better in some odder cases.

commit 987c6b1597f184e035c3ecef15a776f7c64cd4fe
Author: root [EMAIL PROTECTED]
Date:   Thu Jan 11 22:41:23 2007 -0500

No more call to xf86OSRingBell in any cases,
 maybe do some conditional stuff later.

commit 8155e49e76aa2d1d953fb71ead6a5c3110f3d80c
Author: root [EMAIL PROTECTED]
Date:   Mon Jan 8 08:59:44 2007 -0500

Pad out button_names so we can loop over things more sanely.

Support for ignoring the existance of buttons,
and for not telling X about them.

By default don't tell X about tools and touch as buttons.
TODO: Revisit this choice later.

commit e1fe72e7fe663a479a5be1b5e16ecbba52f511a8
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Sat Dec 16 01:42:18 2006 +0200

bump to 1.1.5

commit 9f3be57929048950ad0e03cfef44b5336c38aab3
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Wed Dec 6 18:50:15 2006 +0200

Makefile.am: make ChangeLog hook safer
Make ChangeLog hook as safe as possible.

commit 5a5457e69c719980334cb662e5abcb77cd09bc7a
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Thu Nov 2 03:42:57 2006 +0200

bump to 1.1.4

commit 3fc70342aaba5f95d01b6e51164ae207532fa8f4
Merge: 1a8cea3dc4d8336b61a071a52479e71d7dd619d4 
ef01c2ef65fa64cb213dc3adfa30c75635d1fe03
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Thu Nov 2 03:42:14 2006 +0200

Merge branch 'input-hotplug'

commit 1a8cea3dc4d8336b61a071a52479e71d7dd619d4
Merge: 51d21a369416bb0a45a2894e83a1cb092cc307d8 
4c72fb7b769b78cfa2b4cc39eb03fdacd2b5039c
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Thu Nov 2 03:42:13 2006 +0200

Merge branch 'master' of 
git+ssh://git.freedesktop.org/git/xorg/driver/xf86-input-evdev

commit ef01c2ef65fa64cb213dc3adfa30c75635d1fe03
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Thu Nov 2 03:41:48 2006 +0200

key: use os bell-ringing function
Use the OS bell-ringing function to ding the bell.

commit 036b457c1b3f7d2d174da890cb8598d907181f8e
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Wed Oct 25 02:22:46 2006 +0300

support new DIX motion history API
Use the DIX motion history if we have ABI version 1 or higher.

commit 79eb7dcac8cdbecc07be08737388a8a6574e3d76
Merge: d7f686bfa3e773cfc7740c707da9fc64196e143c 
63f7edf7862032221e25de3c59fee1158d616597
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Tue Oct 17 11:32:39 2006 +0300

Merge branch 'input-hotplug' of 
git+ssh://git.freedesktop.org/git/xorg/driver/xf86-input-evdev into 
input-hotplug

commit d7f686bfa3e773cfc7740c707da9fc64196e143c
Merge: ec09e0d55dd14164cc46a68a71d439cc550df063 
4c72fb7b769b78cfa2b4cc39eb03fdacd2b5039c
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Tue Oct 17 11:31:58 2006 +0300

Merge branch 'master' of 
git+ssh://git.freedesktop.org/git/xorg/driver/xf86-input-evdev into 
input-hotplug

commit ec09e0d55dd14164cc46a68a71d439cc550df063
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Sun Oct 15 19:37:46 2006 +0300

brain: call xf86DeleteInput when removing device
Call xf86DeleteInput from evdevRemoveDevice, so it also gets removed from
xf86InputDevs in the DDX.

commit 4c72fb7b769b78cfa2b4cc39eb03fdacd2b5039c
Author: Adam Jackson [EMAIL PROTECTED]
Date:   Fri Oct 13 18:25:10 2006 -0400

Bump to 1.1.3

commit 77cbbc20b60fd564f8add39bfb840c85d5cad51d
Author: Daniel Stone [EMAIL PROTECTED]
Date:   Sun Oct 8 16:14:12 2006 +0300

key: remove usage of OS keyboard layer for bell
Right now, bell is a no-op.

commit 5c5ef3fbd6eb0b668139df3ff5eda67766e86dcd
Author: Drew Parsons [EMAIL PROTECTED]
Date:   Fri Oct 6 10:56:24 2006 +1000

m68k support (thanks Geert Uytterhoeven for the inotify codes).

commit a96b048e560782399a98c57cad255df778471ea1
Author: Zephaniah E. Hull [EMAIL PROTECTED]
Date:   Mon Oct 2 17:50:55 2006 -0400

Make some debugging messages optional.

Correctly handle emulating relative mode from absolute data in the case 
where
we do not get X and Y data at the same time on touching.

commit d8ea40dc4a78a6197d474d806ac5367dae83655a
Author: Zephaniah E. Hull [EMAIL PROTECTED]
Date:   Mon Oct 2 17:49:20 2006 -0400

Use XORG_VERSION_CURRENT in the module version struct.

commit ab65184d472614d2664e6cd7bca2d6dbc28fad07