Skip to contentSkip to conversation

ppc32: PowerMac trackpad problems

PATCH New Benjamin Herrenschmidt 1 participant 1 message Aug 26, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc32: PowerMac trackpad problems

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.

macintosh/adbhid.c renamed from macintosh/adbhid.c.orig +1 -1
@@ -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,