On 15 Aug 2002, Ben Pfaff wrote: > > > Well, before adding the tab patch and turning on > > > stick_pressure_enabled, it did nothing at all, not the touchpad > > > itself or its buttons. Now the touchpad works fine, I can even > > > double-tap-and-drag, but the touchpad buttons still don't do > > > anything. Does toggeling stick_pressure_enabled really alters the behaviour? > However, I do have a patch against CVS + giant patch that makes > everything work okay for me: > tmp_buttons |= ((data[1] & 0x02) ? GPM_B_RIGHT : 0); > - tp_process_repeating_actions(state,tmp_buttons,last_stick_buttons, > - &last_stick_button_actions[0],stick_actions); > + state->buttons |= tmp_buttons; > + /*tp_process_repeating_actions(state,tmp_buttons,last_stick_buttons, > + &last_stick_button_actions[0],stick_actions);*/ > } This patch has the disadvantage that it does not allow for userdefined behaviour. Of cause it has the small advantage that it works :) Could you try the attached patch and send me the "stick buttons: " output? > I suspect that there's something wrong in the > tp_process_repeating_actions() logic? I tend to believe that our setups differ. Peter -- E-Mail: pebl@xxxxxxxxxx Real name: Peter Berg Larsen Where: Department of Computer Science, Copenhagen Uni., Denmark
--- synaptics_2.c Mon Aug 12 01:45:27 2002 +++ synaptics.c Fri Aug 16 13:24:55 2002 @@ -311,9 +311,9 @@ /* ** Define the action button bit values. */ -#define LEFT_BUTTON 0x01 -#define RIGHT_BUTTON 0x02 -#define MIDDLE_BUTTON 0x04 +#define RIGHT_BUTTON 0x01 +#define MIDDLE_BUTTON 0x02 +#define LEFT_BUTTON 0x04 #define FOURTH_BUTTON 0x08 #define UP_BUTTON 0x10 #define DOWN_BUTTON 0x20 @@ -404,7 +404,7 @@ * same device port. The stick will be ignored in * absolute mode, this option try to recognize * it's packets. C*/ -static int stick_pressure_enabled = 0; /* A (hard) press on the stick is reported as left click C*/ +static int stick_pressure_enabled = 1; /* A (hard) press on the stick is reported as left click C*/ static int four_way_button_enabled = 1; /* Round button giving 4 choices on some touchpads C*/ static int four_way_button_is_mouse= 1; /* Is the button: 4 buttons or does it moves the mouse. C*/ static int scrolling_enabled = 1; /* Simulate wheel mouse in at the right edge C*/ @@ -1418,6 +1419,12 @@ tmp_buttons |= ((data[1] & 0x02) ? GPM_B_RIGHT : 0); tp_process_repeating_actions(state,tmp_buttons,last_stick_buttons, &last_stick_button_actions[0],stick_actions); + + gpm_report (GPM_PR_DEBUG,"Stick buttons: %X %X %X %X %X %X", + state->buttons,tmp_buttons,last_stick_buttons, + last_stick_button_actions[0], + last_stick_button_actions[1], + last_stick_button_actions[2]); } last_stick_buttons = tmp_buttons;