updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / hal / handle-input-touchpad.patch
blob9cd64642210b67f7af9d6122a4feac4f82ec8dc6
1 From 6dccf8e3ad181e8f56b1d2a994ec50a1953a1c2d Mon Sep 17 00:00:00 2001
2 From: Michael Witten <mfwitten@gmail.com>
3 Date: Wed, 06 Jan 2010 00:53:17 +0000
4 Subject: Policy: handle `input.touchpad' explicitly
6 This commit essentially duplicates the policy for:
8 <match key="info.capabilities" contains="input.mouse">
10 and then changes `input.mouse' to `input.touchpad'. This
11 is necessary because in Linus Torvalds's Linux repo:
13 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
15 the following commit:
17 commit 7105d2ea73e1391b681d0e1212c42f561c64d429
18 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
19 Date: Fri Dec 11 23:54:54 2009 -0800
21 Input: ALPS - do not set REL_X/REL_Y capabilities on the touchpad
23 Relative events are only reported via secondary device therefore device
24 associated with the touchpad should not advertise these capabilities.
26 Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
28 made these few changes:
30 diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
31 index a3f492a..b03e7e0 100644
32 /--- a/drivers/input/mouse/alps.c
33 /+++ b/drivers/input/mouse/alps.c
34 /@@ -487,6 +487,17 @@ int alps_init(struct psmouse *psmouse)
35 if (alps_hw_init(psmouse))
36 goto init_fail;
38 + /*
39 + * Undo part of setup done for us by psmouse core since touchpad
40 + * is not a relative device.
41 + */
42 + __clear_bit(EV_REL, dev1->evbit);
43 + __clear_bit(REL_X, dev1->relbit);
44 + __clear_bit(REL_Y, dev1->relbit);
46 + /*
47 + * Now set up our capabilities.
48 + */
49 dev1->evbit[BIT_WORD(EV_KEY)] |= BIT_MASK(EV_KEY);
50 dev1->keybit[BIT_WORD(BTN_TOUCH)] |= BIT_MASK(BTN_TOUCH);
51 dev1->keybit[BIT_WORD(BTN_TOOL_FINGER)] |= BIT_MASK(BTN_TOOL_FINGER);
53 so that HAL no longer adds:
55 input.mouse
57 to an ALPS touchpad's:
59 info.capabilities
61 so that HAL no longer marks the ALPS touchpad with:
63 input.x11_driver = 'evdev'
65 because the policy file:
67 fdi/policy/10osvendor/10-x11-input.fdi
69 doesn't define the policy for:
71 <match key="info.capabilities" contains="input.touchpad">
73 which was previous unnecessary because everything used to
74 be caught by the policy for:
76 <match key="info.capabilities" contains="input.mouse">
78 Signed-off-by: Michael Witten <mfwitten@gmail.com>
79 Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
80 ---
81 diff --git a/fdi/policy/10osvendor/10-x11-input.fdi b/fdi/policy/10osvendor/10-x11-input.fdi
82 index cff8fc5..8bbe263 100644
83 --- a/fdi/policy/10osvendor/10-x11-input.fdi
84 +++ b/fdi/policy/10osvendor/10-x11-input.fdi
85 @@ -16,6 +16,14 @@
86 </match>
87 </match>
89 + <match key="info.capabilities" contains="input.touchpad">
90 + <merge key="input.x11_driver" type="string">mouse</merge>
91 + <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
92 + string="Linux">
93 + <merge key="input.x11_driver" type="string">evdev</merge>
94 + </match>
95 + </match>
97 <match key="info.capabilities" contains="input.tablet">
98 <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
99 string="Linux">
101 cgit v0.8.3-6-g21f6