diff options
author | Ulrich Dangel <uli-kernel@spamt.net> | 2009-06-11 11:15:09 +0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-06-11 13:09:45 +0400 |
commit | d7ed5d883c09c5474f842dcb148515dfaef2a567 (patch) | |
tree | f779fc6625561534cec76fc51dc2312705bd664c /drivers/input/mouse/alps.c | |
parent | 0b346838c5862bfe911432956a106d602535d030 (diff) | |
download | linux-d7ed5d883c09c5474f842dcb148515dfaef2a567.tar.xz |
Input: ALPS - handle touchpoints buttons correctly
When pressing any button belonging to the touchpoint, the generated
click events don't belong to the touchpoint but to the touchpad.
This patch fixes this behaviour, the events will be sent via the
correct device, so scrolling with touchpoint is possible.
Signed-off-by: Ulrich Dangel <uli@spamt.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r-- | drivers/input/mouse/alps.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index cd4203c4deb9..5547e2429fbe 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -132,18 +132,23 @@ static void alps_process_packet(struct psmouse *psmouse) ges = packet[2] & 1; fin = packet[2] & 2; - input_report_key(dev, BTN_LEFT, left); - input_report_key(dev, BTN_RIGHT, right); - input_report_key(dev, BTN_MIDDLE, middle); - if ((priv->i->flags & ALPS_DUALPOINT) && z == 127) { input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x)); input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y)); + + input_report_key(dev2, BTN_LEFT, left); + input_report_key(dev2, BTN_RIGHT, right); + input_report_key(dev2, BTN_MIDDLE, middle); + input_sync(dev); input_sync(dev2); return; } + input_report_key(dev, BTN_LEFT, left); + input_report_key(dev, BTN_RIGHT, right); + input_report_key(dev, BTN_MIDDLE, middle); + /* Convert hardware tap to a reasonable Z value */ if (ges && !fin) z = 40; |