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

Dan Nicholson dbn.lists at gmail.com
Mon Dec 21 12:29:00 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 Xorg similar
property matching capabilities as 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"

	MatchProduct       "Mouse"
	MatchVendor        "Mouse Company"
	MatchDevicePath    "/dev/input/event*"
	MatchIsPointer     "yes"
	MatchIsKeyboard    "no"
	MatchIsJoystick    "no"
	MatchIsTablet      "no"
	MatchIsTouchpad    "no"
	MatchIsTouchscreen "no"

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

Changes since v3:
* Bump ABI_XINPUT_VERSION for the addition of the InputAttributes argument
  to NewInputDeviceRequest.
* Changed the InputAttributes flags to a uint32_t. 32 bits seemed plenty
  big enough, but we can always make it bigger.

I think this is ready to go in now if there are no further comments.

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                         |   25 ++++-
 configure.ac                         |    2 +-
 hw/dmx/dmxinput.c                    |    3 +-
 hw/kdrive/src/kinput.c               |    3 +-
 hw/xfree86/common/xf86Module.h       |    2 +-
 hw/xfree86/common/xf86Option.c       |   25 +----
 hw/xfree86/common/xf86Xinput.c       |   96 ++++++++++++++-
 hw/xfree86/doc/man/xorg.conf.man.pre |   96 ++++++++++++++
 hw/xfree86/parser/Configint.h        |    2 +
 hw/xfree86/parser/InputClass.c       |  232 ++++++++++++++++++++++++++++++++++
 hw/xfree86/parser/Makefile.am        |    1 +
 hw/xfree86/parser/configProcs.h      |    4 +
 hw/xfree86/parser/read.c             |    8 ++
 hw/xfree86/parser/scan.c             |   30 +++++
 hw/xfree86/parser/write.c            |    2 +
 hw/xfree86/parser/xf86Parser.h       |   29 +++++
 hw/xfree86/parser/xf86tokens.h       |   13 ++-
 hw/xquartz/darwinXinput.c            |    3 +-
 include/dix-config.h.in              |    3 +
 include/input.h                      |   16 +++
 22 files changed, 567 insertions(+), 33 deletions(-)
 create mode 100644 hw/xfree86/parser/InputClass.c


More information about the xorg-devel mailing list