[PATCH] ppc32: PowerMac trackpad problems

From: Benjamin Herrenschmidt
Date: Thu Aug 26 2004 - 04:04:52 EST


Hi !

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.

Ben.


Signed-off-by: Alexander Clausen <alex@xxxxxxxxxx>
Signed-off-by: Michael Schmitz <schmitz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>

--- drivers/macintosh/adbhid.c.orig 2004-03-10 23:41:43.000000000 +0100
+++ drivers/macintosh/adbhid.c 2004-03-10 23:41:34.000000000 +0100
@@ -327,7 +327,7 @@
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,


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/