diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-01-12 20:17:48 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-01-12 20:17:48 +0000 |
commit | d1c05312af9d63ef874b6eab5ef7122610ec0f1f (patch) | |
tree | 8b219bdb39de36206c268fde2477f0bc12de47d4 /xserver/config | |
parent | e2393a32cdf018951efe9ed1d2f6b8031c242185 (diff) |
Update to xserver 1.5.3 + latests commits on server-1.5-branch.
tested by stsp@, david@, form@, ckuethe@, oga@. thanks.
Diffstat (limited to 'xserver/config')
-rw-r--r-- | xserver/config/hal.c | 27 | ||||
-rw-r--r-- | xserver/config/x11-input.fdi | 4 |
2 files changed, 29 insertions, 2 deletions
diff --git a/xserver/config/hal.c b/xserver/config/hal.c index 0e0505b66..639e0ec2b 100644 --- a/xserver/config/hal.c +++ b/xserver/config/hal.c @@ -166,6 +166,26 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop) return ret; } +static BOOL +device_is_duplicate(char *config_info) +{ + DeviceIntPtr dev; + + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (dev->config_info && (strcmp(dev->config_info, config_info) == 0)) + return TRUE; + } + + for (dev = inputInfo.off_devices; dev; dev = dev->next) + { + if (dev->config_info && (strcmp(dev->config_info, config_info) == 0)) + return TRUE; + } + + return FALSE; +} + static void device_added(LibHalContext *hal_ctx, const char *udi) { @@ -227,6 +247,13 @@ device_added(LibHalContext *hal_ctx, const char *udi) } sprintf(config_info, "hal:%s", udi); + /* Check for duplicate devices */ + if (device_is_duplicate(config_info)) + { + LogMessage(X_WARNING, "config/hal: device %s already added. Ignoring.\n", name); + goto unwind; + } + /* ok, grab options from hal.. iterate through all properties * and lets see if any of them are options that we can add */ set = libhal_device_get_all_properties(hal_ctx, udi, &error); diff --git a/xserver/config/x11-input.fdi b/xserver/config/x11-input.fdi index f2e2d50ab..6c4a1e325 100644 --- a/xserver/config/x11-input.fdi +++ b/xserver/config/x11-input.fdi @@ -64,8 +64,8 @@ <merge key="input.x11_options.XkbRules" type="string">base</merge> <!-- If we're using Linux, we use evdev by default (falling back to - keyboard otherwise). --> - <merge key="input.x11_driver" type="string">keyboard</merge> + kbd otherwise). --> + <merge key="input.x11_driver" type="string">kbd</merge> <merge key="input.x11_options.XkbModel" type="string">pc105</merge> <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux"> |