0.5.14 release in two weeks?

Dmitry Torokhov dmitry.torokhov at gmail.com
Thu Nov 5 23:47:13 PST 2009


Hi Matrtin,

On Thu, Nov 05, 2009 at 03:26:03PM +0100, Martin Pitt wrote:
> Hello all,
> 
> there's a fair amount of fixes in hal trunk. I'd like to do a 0.5.14
> release in about two weeks, to once again free everyone from carrying
> heavy patches. So now would be a good time to send your remaining
> patches to the list for review.
> 

Please consider applying the patch below.

Thanks.

-- 
Dmitry

From: Dmitry Torokhov <dmitry.torokhov at gmail.com>
Date: Mon, 2 Nov 2009 16:59:10 -0800
Subject: [PATCH] Correctly identify touchpads

BTN_TOUCH (as well as ABS_PRESSURE) is used not only by touchpads but
by touchscreens as well. The proper ceck for a touchpad is presence
of BTN_TOOL_FINGER and absence of BTN_TOOL_PEN (the latter to filter
out some tablets that use BTN_TOOL_FINGER).

Tablet matching should be on either BTN_TOOL_PEN or BTN_STULYS.

Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
---
 hald/linux/device.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/hald/linux/device.c b/hald/linux/device.c
index 2eca1ef..e7c9d4f 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -1157,12 +1157,12 @@ input_test_abs (HalDevice *d, const char *sysfs_path)
 		{
 			num_bits_key = input_str_to_bitmask (s, bitmask_key, sizeof (bitmask_key));
 
-			if (test_bit (BTN_STYLUS, bitmask_key)) {
+			if (test_bit (BTN_STYLUS, bitmask_key) || test_bit (BTN_TOOL_PEN, bitmask_key)) {
 				hal_device_add_capability (d, "input.tablet");
 				goto out;
 			}
 
-			if (test_bit (BTN_TOUCH, bitmask_key)) {
+			if (test_bit (BTN_TOOL_FINGER, bitmask_key) && !test_bit (BTN_TOOL_PEN, bitmask_key)) {
 				hal_device_add_capability (d, "input.touchpad");
 				goto out;
 			}
@@ -1181,11 +1181,6 @@ input_test_abs (HalDevice *d, const char *sysfs_path)
 				goto out;
 			}
 		}
-
-		if (test_bit (ABS_PRESSURE, bitmask_abs)) {
-			hal_device_add_capability (d, "input.touchpad");
-			goto out;
-		}
 	}
 out:
 	;
-- 
1.6.2.5


More information about the hal mailing list