hal: Branch 'master'
Richard Hughes
hughsient at kemper.freedesktop.org
Tue Feb 19 06:36:47 PST 2008
hald/linux/device.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
New commits:
commit 6690e7241164ddbb76570328fcaa47f3a64d8c97
Author: Vinay Reddy <vinayvinay at gmail.com>
Date: Tue Feb 19 14:35:33 2008 +0000
Add input.mouse capability to VMware's absolute USB mouse
Currently, VMware's absolute USB mouse is not correctly tagged by hald
(it only gets the 'input' capability). Here's a patch that adds the
'input.mouse' capability to VMware's absolute USB mouse.
diff --git a/hald/linux/device.c b/hald/linux/device.c
index 43629f7..ef55089 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -265,9 +265,18 @@ input_test_abs (HalDevice *d, const char *sysfs_path)
goto out;
num_bits = input_str_to_bitmask (s, bitmask, sizeof (bitmask));
- if (test_bit (ABS_X, bitmask) && test_bit (ABS_Y, bitmask) && test_bit (ABS_PRESSURE, bitmask)) {
- hal_device_add_capability (d, "input.touchpad");
- goto out;
+ if (test_bit (ABS_X, bitmask) && test_bit (ABS_Y, bitmask)) {
+ if (test_bit (ABS_PRESSURE, bitmask)) {
+ hal_device_add_capability (d, "input.touchpad");
+ goto out;
+ } else {
+ /*
+ * This path is taken by VMware's USB mouse, which has
+ * absolute axes, but no touch/pressure button.
+ */
+ hal_device_add_capability (d, "input.mouse");
+ goto out;
+ }
}
/* TODO: Hmm; this code looks sketchy... why do we do !test_bit on the Y axis ?? */
More information about the hal-commit
mailing list