]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-touchpad.patch
- up to 2.6.17.28
[packages/kernel.git] / kernel-touchpad.patch
1 commit e42b6646a8298fe06a33a0f68dab661335f5db6e
2 Author: Peter Hutterer <peter.hutterer@who-t.net>
3 Date:   Thu Nov 20 15:24:42 2008 -0500
4
5     Input: synaptics - report multi-taps only if supported by the device
6     
7     According to Section 2.4.4 of the Synaptics TouchPad Interfacing
8     Guide, bit 2 specifies if multi-finger detection is provided by
9     the touchpad. Thus, only set BTN_TOOL_DOUBLETAP and
10     BTN_TOOL_TRIPLETAP if the device actually supports it.
11     
12     Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
13     Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14
15 diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
16 index d349c4a..865fc69 100644
17 --- a/drivers/input/mouse/synaptics.c
18 +++ b/drivers/input/mouse/synaptics.c
19 @@ -445,12 +445,14 @@ static void synaptics_process_packet(struct psmouse *psmouse)
20  
21         input_report_abs(dev, ABS_TOOL_WIDTH, finger_width);
22         input_report_key(dev, BTN_TOOL_FINGER, num_fingers == 1);
23 -       input_report_key(dev, BTN_TOOL_DOUBLETAP, num_fingers == 2);
24 -       input_report_key(dev, BTN_TOOL_TRIPLETAP, num_fingers == 3);
25 -
26         input_report_key(dev, BTN_LEFT, hw.left);
27         input_report_key(dev, BTN_RIGHT, hw.right);
28  
29 +       if (SYN_CAP_MULTIFINGER(priv->capabilities)) {
30 +               input_report_key(dev, BTN_TOOL_DOUBLETAP, num_fingers == 2);
31 +               input_report_key(dev, BTN_TOOL_TRIPLETAP, num_fingers == 3);
32 +       }
33 +
34         if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities))
35                 input_report_key(dev, BTN_MIDDLE, hw.middle);
36  
37 @@ -543,12 +545,14 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
38         set_bit(EV_KEY, dev->evbit);
39         set_bit(BTN_TOUCH, dev->keybit);
40         set_bit(BTN_TOOL_FINGER, dev->keybit);
41 -       set_bit(BTN_TOOL_DOUBLETAP, dev->keybit);
42 -       set_bit(BTN_TOOL_TRIPLETAP, dev->keybit);
43 -
44         set_bit(BTN_LEFT, dev->keybit);
45         set_bit(BTN_RIGHT, dev->keybit);
46  
47 +       if (SYN_CAP_MULTIFINGER(priv->capabilities)) {
48 +               set_bit(BTN_TOOL_DOUBLETAP, dev->keybit);
49 +               set_bit(BTN_TOOL_TRIPLETAP, dev->keybit);
50 +       }
51 +
52         if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities))
53                 set_bit(BTN_MIDDLE, dev->keybit);
54  
This page took 0.060706 seconds and 3 git commands to generate.