[patch 1/2] hald modifications for vmware's usb mouse
Vinay Reddy
vinayvinay at gmail.com
Mon Jan 28 04:53:06 PST 2008
Hi,
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.
Thanks,
Vinay
diff --git a/hald/linux/device.c b/hald/linux/device.c
index b55da25..99dc026 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -258,9 +258,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 xorg
mailing list