hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Mon Apr 23 20:46:05 PDT 2007


 doc/TODO            |    2 ++
 hald/linux/device.c |    8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
diff-tree b44cc7ffc6a8cf38c5e80d5f00885a4aae3876be (from c7a1f06380e4dc839c68b23235075834682dcf38)
Author: David Zeuthen <davidz at redhat.com>
Date:   Mon Apr 23 23:45:59 2007 -0400

    recognize touchpads + add TODO about sorting out input device classification

diff --git a/doc/TODO b/doc/TODO
index d6bbad4..d0ab653 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -15,6 +15,8 @@ Items specifically planned for 0.5.10 
 (TODO: need to go through and nominate things for 0.5.10)
 ------------------------------------
 
+ - Sort out input device classification mess
+
  - Don't invoke setfacl(1) directly; use system calls instead
 
  - Should provide a hal-fdi-file-validate tool that validates fdi
diff --git a/hald/linux/device.c b/hald/linux/device.c
index 8540658..a5240b6 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -250,6 +250,12 @@ input_test_abs (HalDevice *d, const char
 		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;
+        }
+
+        /* TODO: Hmm; this code looks sketchy... why do we do !test_bit on the Y axis ?? */
 	if (test_bit(ABS_X, bitmask) && !test_bit(ABS_Y, bitmask)) {
 		long bitmask_touch[NBITS(KEY_MAX)];
 
@@ -262,7 +268,7 @@ input_test_abs (HalDevice *d, const char
 
 		if (test_bit(BTN_TOUCH, bitmask_touch)) {
 			hal_device_add_capability (d, "input.tablet");
-		}
+                }
 	}
 out:
 	;


More information about the hal-commit mailing list