rpms/hal/devel hal-tablet-evdev.patch, NONE, 1.1 hal-tablet.patch, NONE, 1.1 hal-joystick.patch, 1.1, 1.2 hal.spec, 1.180, 1.181

Peter Hutterer whot at fedoraproject.org
Mon Dec 22 00:14:31 UTC 2008


Author: whot

Update of /cvs/pkgs/rpms/hal/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32442

Modified Files:
	hal-joystick.patch hal.spec 
Added Files:
	hal-tablet-evdev.patch hal-tablet.patch 
Log Message:
* Mon Dec 22 2008 Peter Hutterer <peter.hutterer at redhat.com> - 0.5.12-19.20081219git
- hal-joystick.patch: init bitmask before checking it
- Add hal-tablet.patch: move tablet check out of questionable axis check
- Add hal-tablet-evdev.patch: if it's a tablet, use evdev



hal-tablet-evdev.patch:

--- NEW FILE hal-tablet-evdev.patch ---
>From 769361a392868916142ec1462edb04bf41b8393f Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed, 17 Dec 2008 14:15:35 +1000
Subject: [PATCH] Update 10-x11-input.fdi to merge evdev for tablets.

---
 fdi/policy/10osvendor/10-x11-input.fdi |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/fdi/policy/10osvendor/10-x11-input.fdi b/fdi/policy/10osvendor/10-x11-input.fdi
index 6bd8e76..9c5860e 100644
--- a/fdi/policy/10osvendor/10-x11-input.fdi
+++ b/fdi/policy/10osvendor/10-x11-input.fdi
@@ -10,6 +10,13 @@
       </match>
     </match>
 
+    <match key="info.capabilities" contains="input.tablet">
+      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
+             string="Linux">
+        <merge key="input.x11_driver" type="string">evdev</merge>
+      </match>
+    </match>
+
     <match key="info.capabilities" contains="input.keys">
       <!-- If we're using Linux, we use evdev by default (falling back to
            keyboard otherwise). -->
-- 
1.6.0.4


hal-tablet.patch:

--- NEW FILE hal-tablet.patch ---
>From 32c1da337a6422fa4dd6ce58e13e2bfe3ee93504 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed, 17 Dec 2008 13:46:17 +1000
Subject: [PATCH] Fix check for input.tablet - add if ABS_X, ABS_Y and BTN_TOUCH are present.

Previous check required ABS_X to be present but ABS_Y to be absent (this is a
questionable check since Feb 2007).
---
 hald/linux/device.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/hald/linux/device.c b/hald/linux/device.c
index 1b869ea..883379f 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -1123,7 +1123,10 @@ input_test_abs (HalDevice *d, const char *sysfs_path)
 
 			input_str_to_bitmask (s, bitmask_button, sizeof (bitmask_button));
 
-			if (test_bit(BTN_LEFT, bitmask_button)) {
+			if (test_bit(BTN_TOUCH, bitmask_button)) {
+				hal_device_add_capability (d, "input.tablet");
+				goto out;
+			} else if (test_bit(BTN_LEFT, bitmask_button)) {
 				/*
 				 * This path is taken by VMware's USB mouse, which has
 				 * absolute axes, but no touch/pressure button.
@@ -1137,18 +1140,7 @@ input_test_abs (HalDevice *d, const char *sysfs_path)
         }
 
 	if (test_bit(ABS_X, bitmask) && !test_bit(ABS_Y, bitmask)) {
-		long bitmask_touch[NBITS(KEY_MAX)];
-
 		hal_device_add_capability (d, "input.joystick");
-
-		s = hal_util_get_string_from_file (sysfs_path, "capabilities/key");
-		if (s == NULL)
-			goto out;
-		input_str_to_bitmask (s, bitmask_touch, sizeof (bitmask_touch));
-
-		if (test_bit(BTN_TOUCH, bitmask_touch)) {
-			hal_device_add_capability (d, "input.tablet");
-                }
 	}
 
 	if (test_bit(ABS_WHEEL, bitmask) || test_bit(ABS_THROTTLE, bitmask))
-- 
1.6.0.4


hal-joystick.patch:

Index: hal-joystick.patch
===================================================================
RCS file: /cvs/pkgs/rpms/hal/devel/hal-joystick.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hal-joystick.patch	21 Oct 2008 15:47:43 -0000	1.1
+++ hal-joystick.patch	22 Dec 2008 00:14:30 -0000	1.2
@@ -2,7 +2,7 @@
 index 11f79cd..eff4ee5 100644
 --- a/hald/linux/device.c
 +++ b/hald/linux/device.c
-@@ -1060,16 +1060,27 @@ input_test_abs (HalDevice *d, const char *sysfs_path)
+@@ -1060,16 +1060,29 @@ input_test_abs (HalDevice *d, const char *sysfs_path)
  			hal_device_add_capability (d, "input.touchpad");
  			goto out;
  		} else {
@@ -20,6 +20,8 @@
 +				goto out;
 +			}
 +
++			input_str_to_bitmask (s, bitmask_button, sizeof (bitmask_button));
++
 +			if (test_bit(BTN_LEFT, bitmask_button)) {
 +				/*
 +				 * This path is taken by VMware's USB mouse, which has


Index: hal.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hal/devel/hal.spec,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -r1.180 -r1.181
--- hal.spec	19 Dec 2008 19:46:19 -0000	1.180
+++ hal.spec	22 Dec 2008 00:14:30 -0000	1.181
@@ -28,7 +28,7 @@
 Name: hal
 Version: 0.5.12
 #Release: 14%{?dist}
-Release: 18.%{?alphatag}%{?dist}
+Release: 19.%{?alphatag}%{?dist}
 URL: http://www.freedesktop.org/Software/hal
 #Source0: http://hal.freedesktop.org/releases/%{name}-%{version}rc1.tar.bz2
 Source0: http://hal.freedesktop.org/releases/%{name}-%{version}-%{?alphatag}.tar.gz
@@ -42,6 +42,9 @@
 Patch4: hal-joystick.patch
 # https://bugs.freedesktop.org/show_bug.cgi?id=18985
 Patch5: hal-dbus-perms.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=473144
+Patch6: hal-tablet.patch
+Patch7: hal-tablet-evdev.patch
 
 License: AFL or GPLv2
 Group: System Environment/Libraries
@@ -141,6 +144,8 @@
 %patch3 -p1 -b .keys
 %patch4 -p1 -b .joystick
 %patch5 -p1 -b .dbus
+%patch6 -p1 -b .tablet
+%patch7 -p1 -b .tablet-evdev
 
 %build
 %configure                                  \
@@ -287,6 +292,11 @@
 %{_datadir}/gtk-doc/html/libhal-storage/*
 
 %changelog
+* Mon Dec 22 2008 Peter Hutterer <peter.hutterer at redhat.com> - 0.5.12-19.20081219git
+- hal-joystick.patch: init bitmask before checking it
+- Add hal-tablet.patch: move tablet check out of questionable axis check
+- Add hal-tablet-evdev.patch: if it's a tablet, use evdev
+
 * Fri Dec 19 2008 Colin Walters <walters at verbum.org> - 0.5.12-18.20081219git
 - Update dbus permissions patch to include KillSwitch which NetworkManager needs
 




More information about the fedora-extras-commits mailing list