]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc32: PowerMac trackpad problems
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 26 Aug 2004 01:25:26 +0000 (18:25 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 26 Aug 2004 01:25:26 +0000 (18:25 -0700)
The trackpad on recent Apple laptops tend to emmit spurrious 'right
clicks' apparently.  This patch from Alex Clausen fixes it, please
apply.  The trackpad cannot normally emit a right click, so just filter
those out.

Signed-off-by: Alexander Clausen <alex@skip86.com>
Signed-off-by: Michael Schmitz <schmitz@opal.biophys.uni-duesseldorf.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/macintosh/adbhid.c

index c0ab8589b634fe2e34f799a31fc73bbcfedf7e97..27ca59bf038a3e02bd406e379e439a95cccedf8a 100644 (file)
@@ -326,7 +326,7 @@ adbhid_mouse_input(unsigned char *data, int nb, struct pt_regs *regs, int autopo
        input_report_key(&adbhid[id]->input, BTN_LEFT,   !((data[1] >> 7) & 1));
        input_report_key(&adbhid[id]->input, BTN_MIDDLE, !((data[2] >> 7) & 1));
 
-       if (nb >= 4)
+       if (nb >= 4 && adbhid[id]->mouse_kind != ADBMOUSE_TRACKPAD)
                input_report_key(&adbhid[id]->input, BTN_RIGHT,  !((data[3] >> 7) & 1));
 
        input_report_rel(&adbhid[id]->input, REL_X,