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

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



 .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 <peter@p12n.org>
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 <peter@p12n.org>
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
 .B  "  Driver \*qevdev\*q"
 .BI  "  Option \*qevBits\*q  \*q" "+1" \*q
-.BI  "  Option \*qkeyBits\*q \*q" "~1-255 ~352-511" \*q
+.BI  "  Option \*qkeyBits\*q \*q" "~1\-255 ~352\-511" \*q
 .BI  "  Option \*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
 .B  "  Driver \*qevdev\*q"
-.BI  "  Option \*qevBits\*q  \*q" "+1-2" \*q
-.BI  "  Option \*qkeyBits\*q \*q" "~272-287" \*q
-.BI  "  Option \*qrelBits\*q \*q" "~0-2 ~6 ~8" \*q
+.BI  "  Option \*qevBits\*q  \*q" "+1\-2" \*q
+.BI  "  Option \*qkeyBits\*q \*q" "~272\-287" \*q
+.BI  "  Option \*qrelBits\*q \*q" "~0\-2 ~6 ~8" \*q
 .BI  "  Option \*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/event<N>, 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 \*q<map>Bits\*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
-<map>Bits: 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 bit in the range of 5 to
 10 be set.
 .fi
@@ -148,20 +155,24 @@ by typing \*qcat /proc/bus/input/devices\*q, and
 should contain the defines which declare what bits are what for each field.
 
 .TP 7
-.BI "Option \*qbustype\*q \*q" integer \*q
+.BI "Option \*qbustype\*q \*q" n \*q
 Specifies the bus ID for the device you wish to use.
 .fi
-This is either 0 (the default, matches anything), or the Bus=<n> field in
+This is either 0 (the default, matches anything), or the
+.BI Bus= n
+field in
 .B /proc/bus/input/devices
 for your device.
 .fi
 This value depends on what type of bus your device is connected to.
 
 .TP 7
-.BI "Option \*qvendor\*q \*q" integer \*q
+.BI "Option \*qvendor\*q \*q" n \*q
 Specifies the vendor ID for the device you wish to use.
 .fi
-This is either 0 (the default, matches anything), or the Vendor=<n> field in
+This is either 0 (the default, matches anything), or the
+.BI Vendor= n
+field in
 .B /proc/bus/input/devices
 for your device.
 .fi
@@ -169,10 +180,12 @@ This value should remain constant barring perhaps firmware updates to the
 device itself.
 
 .TP 7
-.BI "Option \*qversion\*q \*q" integer \*q
+.BI "Option \*qversion\*q \*q" n \*q
 Specifies the version for the device you wish to use.
 .fi
-This is either 0 (the default, matches anything), or the Version=<n> field in
+This is either 0 (the default, matches anything), or the
+.BI Version= n
+field in
 .B /proc/bus/input/devices
 for your device.
 .fi
@@ -180,10 +193,12 @@ This value should remain constant barring perhaps firmware updates to the
 device itself.
 
 .TP 7
-.BI "Option \*qproduct\*q \*q" integer \*q
+.BI "Option \*qproduct\*q \*q" n \*q
 Specifies the product ID for the device you wish to use.
 .fi
-This is either 0 (the default, matches anything), or the Product=<n> field in
+This is either 0 (the default, matches anything), or the
+.BI Product= n
+field in
 .B /proc/bus/input/devices
 for your device.
 .fi
@@ -191,7 +206,7 @@ This value should remain constant barring perhaps firmware updates to the
 device itself.
 
 .TP 7
-.BI "Option \*qPass\*q \*q" integer \*q
+.BI "Option \*qPass\*q \*q" n \*q
 Specifies the order in which evdev will scan for devices.
 .fi
 This is in the range of 0 to 3, and is used for the case
@@ -223,13 +238,13 @@ The following driver
 .B Options
 control the relative axis portion of the driver:
 .TP 7
-.BI "Option \*q<axis>RelativeAxisMap\*q \*q" number \*q
+.BI "Option \*q" axis "RelativeAxisMap\*q \*q" n \*q
 This remaps the axis specified to the specified valuator.
 .TP 7
-.BI "Option \*q<axis>RelativeAxisButtons\*q \*q" number " number\*q
+.BI "Option \*q" axis "RelativeAxisButtons\*q \*q" "n n" \*q
 This remaps the axis specified to the specified buttons.
 .fi
-Note that the physical buttons are always remapped around 'fake' buttons 
+Note that the physical buttons are always remapped around \*qfake\*q buttons
 created by this option, so that if you have physical buttons 1 2 3 4 5,
 and map the Wheel axis to buttons 4 5, you get buttons 1 2 3
 .B 4 5
@@ -239,8 +254,8 @@ and map the Wheel axis to buttons 4 5, you get buttons 1 2 3
 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,
-<11-15>, HAT0X, HAT0Y, HAT1X, HAT1Y, HAT2X, HAT2Y, HAT3X, HAT3Y, PRESSURE,
-TILT_X, TILT_Y, TOOL_WIDTH, VOLUME, <29-39>, MISC, <41-62>.
+<11\-15>, HAT0X, HAT0Y, HAT1X, HAT1Y, HAT2X, HAT2Y, HAT3X, HAT3Y, PRESSURE,
+TILT_X, TILT_Y, TOOL_WIDTH, VOLUME, <29\-39>, MISC, <41\-62>.
 .fi
 The axes are reported to X as valuators, with the default mapping of axes
 to valuators being the first axes found to the first valuator, the second
@@ -254,21 +269,21 @@ The following driver
 .B Options
 control the relative axis portion of the driver:
 .TP 7
-.BI "Option \*q<axis>AbsoluteAxisMap\*q \*q" number \*q
+.BI "Option \*q" axis "AbsoluteAxisMap\*q \*q" n \*q
 This remaps the axis specified to the specified valuator.
 .TP 7
-.BI "Option \*qAbsoluteScreen\*q \*q" number \*q
+.BI "Option \*qAbsoluteScreen\*q \*q" n \*q
 This binds the device to a specific screen, scaling it to
 the coordinate space of that screen.
 .fi
-The number can either be -1, or a valid screen number.
+The number can either be \-1, or a valid screen number.
 .fi
-If -1 or if in relative mode no scaling or screen fixing is done.
+If \-1 or if in relative mode no scaling or screen fixing is done.
 .fi
 This is of most use for digitizers, where the screen and the input
 device are the same surface.
 .TP 7
-.BI "Option \*qMode\*q \*q" <mode>\*q
+.BI "Option \*qMode\*q \*q" mode \*q
 This selects the default mode for the device.
 .fi
 Valid values are \*qabsolute\*q and \*qrelative\*q.
@@ -277,7 +292,7 @@ This can be set at run time per actual device with the xinput utility.
 .PP
 .SS BUTTON CONFIGURATION
 At the moment, the button portion of this driver only handles buttons
-reported as mouse buttons, that is from BTN_MOUSE to BTN_JOYSTICK - 1.
+reported as mouse buttons, that is from BTN_MOUSE to BTN_JOYSTICK \- 1.
 .fi
 At this time there are no configuration options for buttons.
 .SS KEYBOARD CONFIGURATION
@@ -295,15 +310,15 @@ specifies which XKB rules file to use for interpreting the
 .BR XkbVariant ,
 and
 .B XkbOptions
-settings.  Default: "xorg" for most platforms, but "xfree98" for the
+settings.  Default: \*qxorg\*q for most platforms, but \*qxfree98\*q for the
 Japanese PC-98 platforms.
 .TP 7
 .BI "Option \*qXkbModel\*q \*q" modelname \*q
-specifies the XKB keyboard model name.  Default: "evdev".
+specifies the XKB keyboard model name.  Default: \*qevdev\*q.
 .TP 7
 .BI "Option \*qXkbLayout\*q \*q" layoutname \*q
 specifies the XKB keyboard layout name.  This is usually the country or
-language type of the keyboard.  Default: "us".
+language type of the keyboard.  Default: \*qus\*q.
 .TP 7
 .BI "Option \*qXkbVariant\*q \*q" variants \*q
 specifies the XKB keyboard variant components.  These can be used to
@@ -317,6 +332,6 @@ enhance the keyboard behaviour.  Default: not set.
 .SH AUTHORS
 Zephaniah E. Hull.
 .fi
-Kristian Høgsberg.
+Kristian H\(/ogsberg.
 .SH "SEE ALSO"
 __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__).

commit 1c40c7db188bc9030aaf256004b914815e821940
Author: James Cloos <cloos@jhcloos.com>
Date:   Mon Sep 3 05:52:08 2007 -0400

    Add *~ to .gitignore to skip patch/emacs droppings

diff --git a/.gitignore b/.gitignore
index da4f97a..df3de77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@ ltmain.sh
 missing
 stamp-h1
 .*.swp
+*~

commit e2be2ffa473583b98b93a319163bb54eb5d83ed6
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Wed Aug 1 00:02:33 2007 +0300

    Options: Accept differently-named options
    
    Take some differently-named options for device and the XKB options.  These
    should really be better-handled, but eh.

diff --git a/src/evdev.c b/src/evdev.c
index 94cb619..dc801d0 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -398,7 +398,9 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 
     pInfo->private = pEvdev;
 
-    pEvdev->device = xf86CheckStrOption(dev->commonOptions, "Device", NULL);
+    pEvdev->device = xf86CheckStrOption(dev->commonOptions, "path", NULL);
+    if (!pEvdev->device)
+        pEvdev->device = xf86CheckStrOption(dev->commonOptions, "Device", NULL);
 
     xf86CollectInputOptions(pInfo, NULL, NULL);
     xf86ProcessCommonOptions(pInfo, pInfo->options);
diff --git a/src/evdev_key.c b/src/evdev_key.c
index d278988..eed6319 100644
--- a/src/evdev_key.c
+++ b/src/evdev_key.c
@@ -466,11 +466,22 @@ EvdevKeyNew (InputInfoPtr pInfo)
 
     pInfo->flags |= XI86_KEYBOARD_CAPABLE | XI86_CONFIGURED;
 
-    SetXkbOption (pInfo, "XkbRules", __XKBDEFRULES__, &state->key->xkb_rules);
-    SetXkbOption (pInfo, "XkbModel", "evdev", &state->key->xkb_model);
-    SetXkbOption (pInfo, "XkbLayout", "us", &state->key->xkb_layout);
-    SetXkbOption (pInfo, "XkbVariant", NULL, &state->key->xkb_variant);
-    SetXkbOption (pInfo, "XkbOptions", NULL, &state->key->xkb_options);
+    SetXkbOption (pInfo, "xkb_rules", NULL, &state->key->xkb_rules);
+    if (!state->key->xkb_rules)
+        SetXkbOption (pInfo, "XkbRules", __XKBDEFRULES__,
+                      &state->key->xkb_rules);
+    SetXkbOption (pInfo, "xkb_model", NULL, &state->key->xkb_model);
+    if (!state->key->xkb_model)
+        SetXkbOption (pInfo, "XkbModel", "evdev", &state->key->xkb_model);
+    SetXkbOption (pInfo, "xkb_layout", NULL, &state->key->xkb_layout);
+    if (!state->key->xkb_layout)
+        SetXkbOption (pInfo, "XkbLayout", "us", &state->key->xkb_layout);
+    SetXkbOption (pInfo, "xkb_variant", NULL, &state->key->xkb_variant);
+    if (!state->key->xkb_variant)
+        SetXkbOption (pInfo, "XkbVariant", NULL, &state->key->xkb_variant);
+    SetXkbOption (pInfo, "xkb_options", NULL, &state->key->xkb_options);
+    if (!state->key->xkb_options)
+        SetXkbOption (pInfo, "XkbOptions", NULL, &state->key->xkb_options);
 
     return Success;
 }

commit e86aab93c56ad72f3798169ea94dc6b91dab6ab6
Author: Brice Goglin <Brice.Goglin@ens-lyon.org>
Date:   Thu Jul 26 18:31:58 2007 +0200

    Multiple typos in evdev.man
    
    Reported by "A. Costa" <agcosta@gis.net> in
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432063

diff --git a/man/evdev.man b/man/evdev.man
index 8c6ed00..2395cd8 100644
--- a/man/evdev.man
+++ b/man/evdev.man
@@ -110,7 +110,7 @@ This option uses globbing.
 .BI "Option \*qPhys\*q \*q" string \*q
 Specifies the device phys string for the device you wish to use.
 .fi
-The phys string is generally consistant to the USB port a device is plugged 
+The phys string is generally consistent to the USB port a device is plugged 
 into.
 .fi
 A list of currently plugged in devices and associated device names can be 
@@ -127,7 +127,7 @@ Specifies device capability bits which must be set, possibly set, or unset.
 ff.
 .fi
 The bit specifier format is a string consisting of +<n>, -<n>, and ~<n>
-space sepirated specifiers, where <n> is a positive integer or integer range.
+space separated specifiers, where <n> is a positive integer or integer range.
 (The latter given in the format of 2-6.)
 .fi
 + specifies bits which must be set.
@@ -195,9 +195,9 @@ device itself.
 Specifies the order in which evdev will scan for devices.
 .fi
 This is in the range of 0 to 3, and is used for the case
-where more then one evdev inputsection matches the same device.
+where more then one evdev input section matches the same device.
 .fi
-An inputsection with a lower pass number will always beat out
+An input section with a lower pass number will always beat out
 one with a higher pass number.  Order when both sections are
 the same number is undefined.
 .fi
@@ -206,14 +206,14 @@ The default is 0.
 
 .PP
 .SS RELATIVE AXIS CONFIGURATION
-The relative axis portion of this driver handle all reported relative axies.
+The relative axis portion of this driver handle all reported relative axes.
 .fi
-The axies are named X, Y, Z, RX, RY, RZ, HWHEEL, DIAL, WHEEL, MISC, 10, 11,
+The axes are named X, Y, Z, RX, RY, RZ, HWHEEL, DIAL, WHEEL, MISC, 10, 11,
 12, 13, 14, and 15.
 .fi
-The axies are reported to X as valuators, with the default mapping of axies
-to valuators being the first axies found to the first valuator, the second
-found to the second valuator, and so on, so that if you have axies X, Y,
+The axes are reported to X as valuators, with the default mapping of axes
+to valuators being the first axes found to the first valuator, the second
+found to the second valuator, and so on, so that if you have axes X, Y,
 HWHEEL, and WHEEL, you would have X=0, Y=1, HWHEEL=2, WHEEL=3.
 .fi
 If the driver is reporting core events, valuators 0 and 1 are always mapped
@@ -236,15 +236,15 @@ and map the Wheel axis to buttons 4 5, you get buttons 1 2 3
 6 7, with buttons 6 and 7 being physical buttons 4 and 5.
 .PP
 .SS ABSOLUTE AXIS CONFIGURATION
-The relative axis portion of this driver handle all reported relative axies.
+The relative axis portion of this driver handle all reported relative axes.
 .fi
-The axies 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, BREAK,
 <11-15>, HAT0X, HAT0Y, HAT1X, HAT1Y, HAT2X, HAT2Y, HAT3X, HAT3Y, PRESSURE,
 TILT_X, TILT_Y, TOOL_WIDTH, VOLUME, <29-39>, MISC, <41-62>.
 .fi
-The axies are reported to X as valuators, with the default mapping of axies
-to valuators being the first axies found to the first valuator, the second
-found to the second valuator, and so on, so that if you have axies X, Y,
+The axes are reported to X as valuators, with the default mapping of axes
+to valuators being the first axes found to the first valuator, the second
+found to the second valuator, and so on, so that if you have axes X, Y,
 TILT_X, and TILT_Y, you would have X=0, Y=1, TILT_X=2, TILT_Y=3.
 .fi
 If the driver is reporting core events, valuators 0 and 1 are always mapped
@@ -279,7 +279,7 @@ This can be set at run time per actual device with the xinput utility.
 At the moment, the button portion of this driver only handles buttons
 reported as mouse buttons, that is from BTN_MOUSE to BTN_JOYSTICK - 1.
 .fi
-At this time there are no configuration options for buttens.
+At this time there are no configuration options for buttons.
 .SS KEYBOARD CONFIGURATION
 The keyboard portion of this driver handles all keys reported and requires 
 XKB support.

commit c69f4bd5707093a4f998c3fad508f466edbe8334
Author: Tiago Vignatti <vignatti@c3sl.ufpr.br>
Date:   Fri Jun 15 01:35:29 2007 -0300

    Clean up a little bit the code.

diff --git a/src/evdev.c b/src/evdev.c
index 42bc9df..94cb619 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -267,12 +267,6 @@ EvdevReadInput(InputInfoPtr pInfo)
     }
 }
 
-static void
-EvdevSigioReadInput (int fd, void *data)
-{
-    EvdevReadInput ((InputInfoPtr) data);
-}
-
 static int
 EvdevProc(DeviceIntPtr device, int what)
 {
@@ -315,8 +309,8 @@ EvdevProc(DeviceIntPtr device, int what)
 		xf86Msg(X_ERROR, "%s: Unable to grab device (%s).\n", pInfo->name, strerror(errno));
 
 	xf86FlushInput (pInfo->fd);
-	if (!xf86InstallSIGIOHandler (pInfo->fd, EvdevSigioReadInput, pInfo))
-	    AddEnabledDevice (pInfo->fd);
+
+        xf86AddEnabledDevice(pInfo);
 
 	device->public.on = TRUE;
 

commit 64677ecc76d6eae530960b714712921e1bb9d4a7
Author: Tiago Vignatti <vignatti@c3sl.ufpr.br>
Date:   Fri Jun 15 01:33:49 2007 -0300

    Remove inotify things.

diff --git a/src/Makefile.am b/src/Makefile.am
index 5a68288..0fb7ffd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,4 +29,4 @@
 @DRIVER_NAME@_drv_la_CFLAGS = -Wall
 @DRIVER_NAME@_drv_ladir = @inputdir@
 
-@DRIVER_NAME@_drv_la_SOURCES = evdev.c evdev.h evdev_axes.c evdev_btn.c evdev_key.c inotify.h inotify-syscalls.h
+@DRIVER_NAME@_drv_la_SOURCES = evdev.c evdev.h evdev_axes.c evdev_btn.c evdev_key.c
diff --git a/src/inotify-syscalls.h b/src/inotify-syscalls.h
deleted file mode 100644
index 296da90..0000000
--- a/src/inotify-syscalls.h
+++ /dev/null
@@ -1,83 +0,0 @@
-#ifndef _LINUX_INOTIFY_SYSCALLS_H
-#define _LINUX_INOTIFY_SYSCALLS_H
-
-#include <sys/syscall.h>
-
-#if defined(__i386__)
-# define __NR_inotify_init	291
-# define __NR_inotify_add_watch	292
-# define __NR_inotify_rm_watch	293
-#elif defined(__x86_64__)
-# define __NR_inotify_init	253
-# define __NR_inotify_add_watch	254
-# define __NR_inotify_rm_watch	255
-#elif defined(__powerpc__) || defined(__powerpc64__)
-# define __NR_inotify_init	275
-# define __NR_inotify_add_watch	276
-# define __NR_inotify_rm_watch	277
-#elif defined (__ia64__)
-# define __NR_inotify_init	1277
-# define __NR_inotify_add_watch	1278
-# define __NR_inotify_rm_watch	1279
-#elif defined (__s390__)
-# define __NR_inotify_init	284
-# define __NR_inotify_add_watch	285
-# define __NR_inotify_rm_watch	286
-#elif defined (__alpha__)
-# define __NR_inotify_init	444
-# define __NR_inotify_add_watch	445
-# define __NR_inotify_rm_watch	446
-#elif defined (__sparc__) || defined (__sparc64__)
-# define __NR_inotify_init	151
-# define __NR_inotify_add_watch	152
-# define __NR_inotify_rm_watch	156
-#elif defined (__arm__)
-# define __NR_inotify_init	316
-# define __NR_inotify_add_watch	317
-# define __NR_inotify_rm_watch	318
-#elif defined (__sh__)
-# define __NR_inotify_init	290
-# define __NR_inotify_add_watch	291
-# define __NR_inotify_rm_watch	292
-#elif defined (__hppa__) || defined (__hppa64__)
-# define __NR_inotify_init	269
-# define __NR_inotify_add_watch	270
-# define __NR_inotify_rm_watch	271
-#elif defined (__mips__)
-# if _MIPS_SIM == _MIPS_SIM_ABI32
-#  define __NR_inotify_init		4284
-#  define __NR_inotify_add_watch	4285
-#  define __NR_inotify_rm_watch		4286
-# elif _MIPS_SIM == _MIPS_SIM_NABI32
-#  define __NR_inotify_init		6247
-#  define __NR_inotify_add_watch	6248
-#  define __NR_inotify_rm_watch		6249
-# elif _MIPS_SIM == _MIPS_SIM_ABI64
-#  define __NR_inotify_init		5243
-#  define __NR_inotify_add_watch	5244
-#  define __NR_inotify_rm_watch		5245
-# endif
-#elif defined (__mc68000__)
-# define __NR_inotify_init		284
-# define __NR_inotify_add_watch		285
-# define __NR_inotify_rm_watch		286
-#else
-# error "Unsupported architecture!"
-#endif
-
-static inline int inotify_init (void)
-{
-	return syscall (__NR_inotify_init);
-}
-
-static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
-{
-	return syscall (__NR_inotify_add_watch, fd, name, mask);
-}
-
-static inline int inotify_rm_watch (int fd, __u32 wd)
-{
-	return syscall (__NR_inotify_rm_watch, fd, wd);
-}
-
-#endif /* _LINUX_INOTIFY_SYSCALLS_H */
diff --git a/src/inotify.h b/src/inotify.h
deleted file mode 100644
index 20d419a..0000000
--- a/src/inotify.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Inode based directory notification for Linux
- *
- * Copyright (C) 2005 John McCutchan
- */
-
-#ifndef _LINUX_INOTIFY_H
-#define _LINUX_INOTIFY_H
-
-#include <linux/types.h>
-
-/*
- * struct inotify_event - structure read from the inotify device for each event
- *
- * When you are watching a directory, you will receive the filename for events
- * such as IN_CREATE, IN_DELETE, IN_OPEN, IN_CLOSE, ..., relative to the wd.
- */
-struct inotify_event {
-	__s32		wd;		/* watch descriptor */
-	__u32		mask;		/* watch mask */
-	__u32		cookie;		/* cookie to synchronize two events */
-	__u32		len;		/* length (including nulls) of name */
-	char		name[0];	/* stub for possible name */
-};
-
-/* the following are legal, implemented events that user-space can watch for */
-#define IN_ACCESS		0x00000001	/* File was accessed */
-#define IN_MODIFY		0x00000002	/* File was modified */
-#define IN_ATTRIB		0x00000004	/* Metadata changed */
-#define IN_CLOSE_WRITE		0x00000008	/* Writtable file was closed */
-#define IN_CLOSE_NOWRITE	0x00000010	/* Unwrittable file closed */
-#define IN_OPEN			0x00000020	/* File was opened */
-#define IN_MOVED_FROM		0x00000040	/* File was moved from X */
-#define IN_MOVED_TO		0x00000080	/* File was moved to Y */
-#define IN_CREATE		0x00000100	/* Subfile was created */
-#define IN_DELETE		0x00000200	/* Subfile was deleted */
-#define IN_DELETE_SELF		0x00000400	/* Self was deleted */
-
-/* the following are legal events.  they are sent as needed to any watch */
-#define IN_UNMOUNT		0x00002000	/* Backing fs was unmounted */
-#define IN_Q_OVERFLOW		0x00004000	/* Event queued overflowed */
-#define IN_IGNORED		0x00008000	/* File was ignored */
-
-/* helper events */
-#define IN_CLOSE		(IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* close */
-#define IN_MOVE			(IN_MOVED_FROM | IN_MOVED_TO) /* moves */
-
-/* special flags */
-#define IN_ISDIR		0x40000000	/* event occurred against dir */
-#define IN_ONESHOT		0x80000000	/* only send event once */
-
-/*
- * All of the events - we build the list by hand so that we can add flags in
- * the future and not break backward compatibility.  Apps will get only the
- * events that they originally wanted.  Be sure to add new events here!
- */
-#define IN_ALL_EVENTS	(IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \
-			 IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \
-			 IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF)
-#endif	/* _LINUX_INOTIFY_H */

commit 08a09682f5b6d43181e98bc72782e2b2eec180e5
Author: Zephaniah E. Hull <warp@agamemnon.b5>
Date:   Wed Jun 13 11:05:07 2007 -0400

    Update version using PACKAGE_VERSION_*.

diff --git a/src/evdev.c b/src/evdev.c
index 868bbff..42bc9df 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -562,7 +562,7 @@ static XF86ModuleVersionInfo EvdevVersionRec =
     MODINFOSTRING1,
     MODINFOSTRING2,
     XORG_VERSION_CURRENT,
-    1, 1, 0,
+    PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
     ABI_CLASS_XINPUT,
     ABI_XINPUT_VERSION,
     MOD_CLASS_XINPUT,

commit 9c9a47210a6c7146f29fd6d05b6f46955a3bee5a
Author: Zephaniah E. Hull <warp@agamemnon.b5>
Date:   Tue Jun 12 11:59:16 2007 -0400

    Move the mode option handling to the Init stage.
    (Sorta ugly placement wise, but the other segfaults.)

diff --git a/src/evdev_axes.c b/src/evdev_axes.c
index 60bfde7..e967c61 100644
--- a/src/evdev_axes.c
+++ b/src/evdev_axes.c
@@ -726,18 +726,6 @@ EvdevAxisAbsNew1(InputInfoPtr pInfo)
 	}
     }
 
-    s = xf86SetStrOption(pInfo->options, "Mode", "Absolute");
-    if (!strcasecmp(s, "Absolute")) {
-	pInfo->dev->valuator->mode = Absolute;
-	xf86Msg(X_CONFIG, "%s: Configuring in %s mode.\n", pInfo->name, s);
-    } else if (!strcasecmp(s, "Relative")) {
-	pInfo->dev->valuator->mode = Relative;
-	xf86Msg(X_CONFIG, "%s: Configuring in %s mode.\n", pInfo->name, s);
-    } else {
-	pInfo->dev->valuator->mode = Absolute;
-	xf86Msg(X_CONFIG, "%s: Unknown Mode: %s.\n", pInfo->name, s);
-    }
-
     return Success;
 }
 
@@ -861,6 +849,7 @@ EvdevAxesInit (DeviceIntPtr device)
     evdevAxesRec *axes = state->axes;
     AbsoluteClassRec *dev_abs;
     int i;
+    const char *s;
 
     if (!axes || !axes->axes)
 	return Success;
@@ -874,6 +863,23 @@ EvdevAxesInit (DeviceIntPtr device)
                                        0))
         return !Success;
 
+
+    /*
+     * This has to go in Init, because until now there is no valuator struct
+     * allocated.
+     */
+    s = xf86SetStrOption(pInfo->options, "Mode", "Absolute");
+    if (!strcasecmp(s, "Absolute")) {
+	pInfo->dev->valuator->mode = Absolute;
+	xf86Msg(X_CONFIG, "%s: Configuring in %s mode.\n", pInfo->name, s);
+    } else if (!strcasecmp(s, "Relative")) {
+	pInfo->dev->valuator->mode = Relative;
+	xf86Msg(X_CONFIG, "%s: Configuring in %s mode.\n", pInfo->name, s);
+    } else {
+	pInfo->dev->valuator->mode = Absolute;
+	xf86Msg(X_CONFIG, "%s: Unknown Mode: %s.\n", pInfo->name, s);
+    }
+
     /*
      * Yes, we want to do this for relative devices too.
      * Some of the settings are useful for both.

commit 2d2c4804f925505e737c2c812687f47840218c93
Author: Zephaniah E. Hull <warp@agamemnon.b5>
Date:   Mon Jun 11 09:08:24 2007 -0400

    evdev.c:
    
        Set and use the X mode control, letting XInput see it properly.
    
        Kill some cruft.
    
    evdev.h:
    
        Set and use the X mode control, letting XInput see it properly.
    
    evdev_axes.c:
    
        Set and use the X mode control, letting XInput see it properly.
    
    evdev_key.c:
    
        Remove some cruft, the bell func can be NULL now, so do so.
    
        Don't bother looking for keys above 0xF7 until we can actually do
        something with them.

diff --git a/src/evdev.c b/src/evdev.c
index 881f079..868bbff 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -367,9 +367,7 @@ EvdevSwitchMode (ClientPtr client, DeviceIntPtr device, int mode)
 	case Absolute:
 	case Relative:
 	    xf86Msg(X_INFO, "%s: Switching mode to %d.\n", pInfo->name, mode);
-	    if (state->abs)
-		state->mode = mode;
-	    else
+	    if (!state->abs)
 		return !Success;
 	    break;
 	default:
@@ -379,11 +377,6 @@ EvdevSwitchMode (ClientPtr client, DeviceIntPtr device, int mode)
     return Success;
 }
 
-/*
-static Bool
-EvdevNew(evdevDriverPtr driver, evdevDevicePtr device)
-*/
-
 InputInfoPtr
 EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 {
@@ -407,9 +400,6 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
     pInfo->device_control = EvdevProc;
     pInfo->read_input = EvdevReadInput;
     pInfo->switch_mode = EvdevSwitchMode;
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
-    pInfo->motion_history_proc = xf86GetMotionEvents;
-#endif
     pInfo->conf_idev = dev;
 
     pInfo->private = pEvdev;
diff --git a/src/evdev.h b/src/evdev.h
index d14bba3..9d84843 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -181,7 +181,6 @@ typedef struct {
 typedef struct _evdevState {
     Bool	can_grab;
     Bool	sync;
-    int		mode;	/* Either Absolute or Relative. */
 
     evdevBtnPtr	btn;
     evdevAbsPtr	abs;
diff --git a/src/evdev_axes.c b/src/evdev_axes.c
index 4abab46..60bfde7 100644
--- a/src/evdev_axes.c
+++ b/src/evdev_axes.c
@@ -581,7 +581,7 @@ EvdevAxesAbsProcess (InputInfoPtr pInfo, struct input_event *ev)
 
     if (v_flags & EV_ABS_V_M_REL)
 	is_rel = 1;
-    else if ((v_flags & EV_ABS_V_M_AUTO) && state->mode == Relative)
+    else if ((v_flags & EV_ABS_V_M_AUTO) && pInfo->dev->valuator->mode == Relative)
 	is_rel = 1;
     else
 	is_rel = 0;
@@ -728,13 +728,13 @@ EvdevAxisAbsNew1(InputInfoPtr pInfo)
 
     s = xf86SetStrOption(pInfo->options, "Mode", "Absolute");
     if (!strcasecmp(s, "Absolute")) {
-	state->mode = Absolute;
+	pInfo->dev->valuator->mode = Absolute;
 	xf86Msg(X_CONFIG, "%s: Configuring in %s mode.\n", pInfo->name, s);
     } else if (!strcasecmp(s, "Relative")) {
-	state->mode = Relative;
+	pInfo->dev->valuator->mode = Relative;
 	xf86Msg(X_CONFIG, "%s: Configuring in %s mode.\n", pInfo->name, s);
     } else {
-	state->mode = Absolute;
+	pInfo->dev->valuator->mode = Absolute;
 	xf86Msg(X_CONFIG, "%s: Unknown Mode: %s.\n", pInfo->name, s);
     }
 
diff --git a/src/evdev_key.c b/src/evdev_key.c
index b0864a3..d278988 100644
--- a/src/evdev_key.c
+++ b/src/evdev_key.c
@@ -331,22 +331,6 @@ static KeySym map[] = {
     /* 0xf7 */  NoSymbol,	NoSymbol,
 };
 
-/*
- * FIXME: We have no way of ringing the bell ourselves.
- *
- * And recent versions of X don't have the system call.
- * Who cares.
- */
-static void
-EvdevKbdBell (int percent, DeviceIntPtr device, pointer arg, int unused)
-{
-#if 0
-    KeybdCtrl *ctrl = arg;
-
-    xf86OSRingBell(percent, ctrl->bell_pitch, ctrl->bell_duration);
-#endif
-}
-
 static void
 EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl)
 {
@@ -440,7 +424,7 @@ EvdevKeyInit (DeviceIntPtr device)
 	    state->key->xkb_options);
 
     XkbInitKeyboardDeviceStruct (device, &state->key->xkbnames, &keySyms, modMap,
-	    EvdevKbdBell, EvdevKbdCtrl);
+	    NULL, EvdevKbdCtrl);
 
     return Success;
 }
@@ -467,17 +451,11 @@ EvdevKeyNew (InputInfoPtr pInfo)
     evdevStatePtr state = &pEvdev->state;
     int i, keys = 0;
 
-    for (i = 0; i <= KEY_UNKNOWN; i++)
+    for (i = 0; i <= 0xF7; i++)
 	if (test_bit (i, pEvdev->bits.key)) {
 	    keys = 1;
 	    break;
 	}
-    if (!keys)
-	for (i = KEY_OK; i <= KEY_MAX; i++)
-	    if (test_bit (i, pEvdev->bits.key)) {
-		keys = 1;
-		break;
-	    }
 
     if (!keys)
 	return !Success;

commit 6b97bf7a4eaa34ebde4ac7250f660da5bab8164d
Author: Zephaniah E. Hull <warp@agamemnon.b5>
Date:   Wed Jun 6 05:00:29 2007 -0400

    Handle default remapping around existing button targets better.

diff --git a/src/evdev_btn.c b/src/evdev_btn.c
index 90f33b4..c03f879 100644
--- a/src/evdev_btn.c
+++ b/src/evdev_btn.c
@@ -362,7 +362,7 @@ EvdevBtnNew1(InputInfoRec *pInfo)
     evdevStateRec *state = &pEvdev->state;
     evdevBtnRec *btn = state->btn;
     char option[128], value[128];
-    int i, b, j;
+    int i, b, j, target;
 
     if (!btn)
 	return !Success;
@@ -375,24 +375,32 @@ EvdevBtnNew1(InputInfoRec *pInfo)
 	btn->real_buttons++;
 
 	snprintf(option, sizeof(option), "Button%sMapTo", button_names[i]);
+
 	if (b >= BTN_DIGI && b < BTN_WHEEL)
-	    snprintf (value, sizeof (value), "null");
+	    target = -1;
 	else if (b == BTN_RIGHT)
-	    snprintf (value, sizeof (value), "Button 3");
+	    target = 3;
 	else if (b == BTN_MIDDLE)
-	    snprintf (value, sizeof (value), "Button 2");
+	    target = 2;
 	else if (b >= BTN_MOUSE && b < BTN_JOYSTICK)
-	    snprintf (value, sizeof (value), "Button %d", 1 + i - (BTN_MOUSE - BTN_MISC));
+	    target = 1 + i - (BTN_MOUSE - BTN_MISC);
 	else if (b >= BTN_MISC && b < BTN_MOUSE)
-	    snprintf (value, sizeof (value), "Button %d", 1 + i + (BTN_MOUSE - BTN_MISC));
-	else if (btn->b_flags[i] & EV_BTN_B_PRESENT) {
-	    for (j = i; j < BTN_MAX; j++)
+	    target = 1 + i + (BTN_MOUSE - BTN_MISC);
+	else
+	    target = 1 + i;
+
+	if (btn->b_flags[target] & EV_BTN_B_PRESENT) {
+	    for (j = target; j < BTN_MAX; j++)
 		if (!(btn->b_flags[j] & EV_BTN_B_PRESENT)) {
-		    snprintf (value, sizeof (value), "Button %d", j + 1);
+		    target = j;
 		    break;
 		}
-	} else
-	    snprintf (value, sizeof (value), "Button %d", i + 1);
+	}
+
+	if (target > 0)
+	    snprintf (value, sizeof (value), "Button %d", target);
+	else
+	    snprintf (value, sizeof (value), "null");
 
 	EvdevParseMapOption (pInfo, option, value, &btn->b_map_data[i], &btn->b_map[i]);
     }

commit 5c6b3dd86feef58ccf43a710624404031df72f2c
Author: Zephaniah E. Hull <warp@agamemnon.b5>
Date:   Wed Jun 6 04:42:51 2007 -0400

    Move MapButtons_t closer to where it's used.

diff --git a/src/evdev_btn.c b/src/evdev_btn.c
index 63a6abf..90f33b4 100644
--- a/src/evdev_btn.c
+++ b/src/evdev_btn.c
@@ -161,13 +161,6 @@ EvdevBtnPostFakeClicks(InputInfoRec *pInfo, int button, int count)
     }
 }
 
-typedef struct {
-    int button_plus;
-    int button_minus;
-    int step;
-    int count;
-} MapButtons_t;
-
 static void
 EvdevMapButton (InputInfoRec *pInfo, int value, int mode, void *map_data)



Reply to: