[PATCH v2 0/3] xfree86: Configure input devices by attributes

Dan Nicholson dbn.lists at gmail.com
Fri Nov 27 14:00:58 PST 2009


These patches add support in xorg.conf to apply input configuration to a
class of devices by attribute. The idea is to offer similar property
matching capabilities to the hal fdi system. Moving the configuration
back into the ddx means that some day we can stop doing it from the
config backend and asking users to adjust to it.

The mechanism used here is an InputClass section. Here is a contrived
example section showing all the current attribute matchers:

Section "InputClass"
        Identifier    "My Mice"

        MatchDevicePath "/dev/input/event*"
        MatchName       "Mouse"
        MatchIsPointer  "yes"
        MatchIsKeyboard "no"

        Driver        "evdev"
        Option        "InvertX" "on"
EndSection

Changes since v1:
- Folded in Peter's suggestions for naming the type InputAttributes
  instead of InputProperties and namespacing the xorg.conf options with
  Match prefixes.
- Reversed the option merging sense so that driver options passed in from
  the config backend or in earlier InputClass sections have preference.
  This would the InputClass settings to begin use without overriding
  existing hal setups.

Dan Nicholson (3):
  xfree86: Support non-Option boolean entries in configuration
  config: Introduce InputAttributes in NewInputDeviceRequest
  xfree86: Introduce InputClass configuration

 Xi/stubs.c                           |    3 +-
 config/dbus.c                        |    2 +-
 config/hal.c                         |   11 ++-
 configure.ac                         |    2 +-
 hw/dmx/dmxinput.c                    |    3 +-
 hw/kdrive/src/kinput.c               |    3 +-
 hw/xfree86/common/xf86Option.c       |   25 +----
 hw/xfree86/common/xf86Xinput.c       |   81 ++++++++++++++-
 hw/xfree86/doc/man/xorg.conf.man.pre |   89 ++++++++++++++++
 hw/xfree86/parser/Configint.h        |    4 +
 hw/xfree86/parser/InputClass.c       |  191 ++++++++++++++++++++++++++++++++++
 hw/xfree86/parser/Makefile.am        |    1 +
 hw/xfree86/parser/configProcs.h      |    5 +
 hw/xfree86/parser/read.c             |    8 ++
 hw/xfree86/parser/scan.c             |   30 ++++++
 hw/xfree86/parser/write.c            |    2 +
 hw/xfree86/parser/xf86Parser.h       |   24 ++++
 hw/xfree86/parser/xf86tokens.h       |    8 ++-
 hw/xquartz/darwinXinput.c            |    3 +-
 include/dix-config.h.in              |    3 +
 include/input.h                      |   10 ++
 21 files changed, 476 insertions(+), 32 deletions(-)
 create mode 100644 hw/xfree86/parser/InputClass.c



More information about the xorg-devel mailing list