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
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))
39 + * Undo part of setup done for us by psmouse core since touchpad
40 + * is not a relative device.
42 + __clear_bit(EV_REL, dev1->evbit);
43 + __clear_bit(REL_X, dev1->relbit);
44 + __clear_bit(REL_Y, dev1->relbit);
47 + * Now set up our capabilities.
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:
57 to an ALPS touchpad's:
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>
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
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"
93 + <merge key="input.x11_driver" type="string">evdev</merge>
97 <match key="info.capabilities" contains="input.tablet">
98 <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"