summaryrefslogtreecommitdiff
path: root/config/hal.c
AgeCommit message (Collapse)AuthorFilesLines
2010-02-11Add tag matching to input attributes.Peter Hutterer1-0/+9
Tags may be a list of comma-separated strings that match against a MatchTag InputClass section. If any of the tags specified for a device match against the MatchTag of the section, this match is evaluated true and passed on to the next match condition. Tags are specified as "input.tags" (hal) or "ID_INPUT.tags" (udev), the value of the tags is case-sensitive and require an exact match (not a substring match). i.e. "quirk" will not match "QUIRK", "need_quirk" or "quirk_needed". Example configuration: udev: ENV{ID_INPUT.tags}="foo,bar" hal: <merge key="input.tags" type="string">foo,bar</merge> xorg.conf: Section "InputClass" Identifier "foobar quirks" MatchTag "foo|foobar" Option "Foobar" "on" EndSection Where the xorg.conf section matches against any device with the tag "foo" or tag "foobar" set. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2009-12-30config: add libudev input-hotplug backendJulien Cristau1-62/+1
Add a backend using libudev for input hotplug, and disable the hal and dbus backends if this one is enabled. XKB configuration happens using xkb{rules,model,layout,variant,options} properties (case-insensitive) on the device. We fill in InputAttributes to allow configuration through InputClass in Xorg. Requires udev 148 for the input_id helper and ID_INPUT* properties. Signed-off-by: Julien Cristau <jcristau@debian.org> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-22config: Introduce InputAttributes in NewInputDeviceRequestDan Nicholson1-1/+24
In order to give NewInputDeviceRequest more information, a new InputAttributes type is introduced. Currently, this collects the product and vendor name, device path, and sets booleans for attributes such as having keys and/or a pointer. Only the HAL backend fills in the attributes, though. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
2009-08-14config: don't shutdown the libhal ctx if it failed to initialize (#23213)Peter Hutterer1-10/+11
Regression introduced by b1c3dc6ae226db178420e3b5f297b94afc87c94c. Shutting down the libhal_ctx if the init failed may cause an abort. This can happen if hald is not yet running at server startup. X.Org Bug 23213 <http://bugs.freedesktop.org/show_bug.cgi?id=23213> Tested-by: Stefan Dirsch Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-28config: add HAL error checksRémi Cardona1-10/+22
This patch simplifies error handling in the HAL code and fixes a segfault if libhal_find_device_by_capability() failed. Fixes http://bugs.gentoo.org/278760 Based on a patch by Martin von Gagern <Martin.vGagern@gmx.net> Signed-off-by: Rémi Cardona <remi@gentoo.org> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-08Don't printf NULL pointers on HAL connection errorAlan Coopersmith1-3/+6
Fixes Solaris bug 6801386 Xorg core dumps on startup if hald not running http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6801386 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-02-10config: if we can't connect to HAL, listen for a startup notification.Peter Hutterer1-6/+105
If HAL isn't available when we try to connect, the registered NameOwnerChanged signal handler waits until HAL is available. Once we connected to HAL, we unregister the signal handler again. This allows HAL to be started in parallel or after the server has started. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-11-05When HAL returns a NULL property, print "(null)" instead of a NULL pointerAlan Coopersmith1-1/+1
They've promised to fix Solaris printf soon to check for NULL pointers instead of segfaulting, but that won't help people on existing releases.
2008-10-29config: don't add duplicate devices through HAL.Peter Hutterer1-0/+27
If HAL is restarted, the device list is sent to the server again, leading first to duplicate devices (and thus duplicate events), and later to a FatalError "Too many input devices." dev->config_info contains the UDI for the device. If the UDI of a new devices is equal to one we already have in the device list, just ignore it. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-09-26config: print error code if NIDR fails.Peter Hutterer1-2/+3
2008-08-04config: protect against potential out-of-bounds indexing.Peter Hutterer1-3/+4
2008-08-04config: support type strlist for XkbOptions property.Peter Hutterer1-6/+23
For backwards compatibility with server 1.4.
2008-08-04config: add parsing for input.x11_options.XkbOptions. #16874Peter Hutterer1-0/+15
X.Org Bug 16874 <http://bugs.freedesktop.org/show_bug.cgi?id=16784>
2008-07-16HAL: Remove grotesque open-coded strcasestrDaniel Stone1-13/+0
Not only was this pretty ugly, but it didn't even work on systems without strcasestr anyway, due to the define not being in dix-config.h. Lack of strcasestr is handled transparently with the version from FreeBSD now anyway, so, huzzah.
2008-06-02config: init dev to NULL to shut up a valgrind warning.Peter Hutterer1-1/+1
2008-05-16Fix hal shutdown crash.Adam Jackson1-3/+5
Removing the device invalidates its ->next pointer. Copy it aside before destroying the device.
2008-05-12Check for strcasestr and workaround it on systems without itAlan Coopersmith1-0/+13
2008-05-09config: override xkb_{r,m,l,v} with Xkb{r,m,l,v} if the latter is set.Peter Hutterer1-15/+89
The HAL spec says that input.xkb.{rmlv}* can be sent, but if the user specifies a X-specific {rmlv}, then this is overridden through the use of input.x11_options.Xkb{RMLV}. However, the way how the server parses options--by ignoring capitalisation, underscores and spaces--the HAL and the x11_options would override each other. So we simply filter the options, letting Xkb{RMLV} override xkb_{rmlv} and only actually add them to the device after parsing _all_ options. * rmlv ... rules, model, layout, variant See Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037> (cherry picked from commit fc35d1e3be201e3821413bb2eeb8d43e1e56ba17)
2008-05-09config: remove trailing whitespaces.Peter Hutterer1-26/+26
It makes my vim look ugly. Put "let c_space_errors=1" into your .vimrc. (cherry picked from commit 1f54c05cf8a6b82e5fc6362f7f8e8fdc2444b9e8)
2008-03-25Support to pass arbitrary options via HAL hotpluggingSascha Hlusiak1-79/+115
Parse "input.x11_options" and pass every key/name pair to the driver. Remove check for input.capabilities, because that's part of the fdi files. Thanks to Dustin Spicuzza <dustin@virtualroadside.com> for the patch.
2008-01-29config: only shutdown libhal if the connection is valid.Peter Hutterer1-5/+7
Thanks to libdbus' extensive use of assert we won't just get an error, it'll bring the whole server down for us. (cherry picked from commit fb07fab2c07e7b0834724541dc47bfba02ba8574)
2008-01-29config: add a debug message, fix a whitespace error.Peter Hutterer1-2/+3
(cherry picked from commit 7732898aaa70e076000f6e6aa9420482896ed996)
2007-12-28Config: HAL: Don't leak options on failure to add deviceDaniel Stone1-1/+10
This showed up in Xephyr in particular, which denies new device requests.
2007-12-26Config: Don't forget to add xkb_rules optionFatih Aşıcı1-0/+2
2007-12-26Config: Fix a memory leakFatih Aşıcı1-0/+2
2007-12-05Config: HAL: Fix XKB option parsingKanru Chen1-2/+3
Actually combine the XKB options into a string, rather than just repeatedly writing a comma.
2007-11-04Config: HAL: Touchpads are pointers tooMarkku Vire1-1/+2
Treat touchpads -- not just mice -- as pointer devices.
2007-08-08Hotplug: HAL: Fix error handlingDaniel Stone1-18/+17
Don't use our DBusError for property getting, because we simply don't care: this fixes D-Bus error spew to stderr. Thanks Michel Dänzer for debugging and testing.
2007-08-08Config: HAL: Use input.xkb namespaceDaniel Stone1-5/+5
Use an explicit input.xkb.foo namespace, not input.xkb_foo.
2007-08-01Convert all my license statements to the standard formDaniel Stone1-18/+20
Convert all my license statements to the standard, accepted form: cf. <20070717142307.GD13478@fooishbar.org> http://lists.freedesktop.org/archives/xorg/2007-July/026451.html keithp's license on configure.ac changed with his verbal permission.
2007-08-01Hotplug: Add HAL supportDaniel Stone1-0/+369
Add support for HAL-based hotplugging, in which we just get the list of input devices and properties from HAL. Requires an FDI which is not yet in mainline HAL.