View | Details | Raw Unified | Return to bug 196624 | Differences between
and this patch

Collapse All | Expand All

(-)wsp.c (-1 / +7 lines)
Lines 87-92 Link Here
87
	int	pressure_untouch_threshold;
87
	int	pressure_untouch_threshold;
88
	int	pressure_tap_threshold;
88
	int	pressure_tap_threshold;
89
	int	scr_hor_threshold;
89
	int	scr_hor_threshold;
90
	int	one_finger_tap;
90
}
91
}
91
	wsp_tuning =
92
	wsp_tuning =
92
{
93
{
Lines 96-101 Link Here
96
	.pressure_untouch_threshold = 10,
97
	.pressure_untouch_threshold = 10,
97
	.pressure_tap_threshold = 120,
98
	.pressure_tap_threshold = 120,
98
	.scr_hor_threshold = 20,
99
	.scr_hor_threshold = 20,
100
	.one_finger_tap = 1,
99
};
101
};
100
102
101
static void
103
static void
Lines 107-112 Link Here
107
	WSP_CLAMP(ptun->pressure_untouch_threshold, 1, 255);
109
	WSP_CLAMP(ptun->pressure_untouch_threshold, 1, 255);
108
	WSP_CLAMP(ptun->pressure_tap_threshold, 1, 255);
110
	WSP_CLAMP(ptun->pressure_tap_threshold, 1, 255);
109
	WSP_CLAMP(ptun->scr_hor_threshold, 1, 255);
111
	WSP_CLAMP(ptun->scr_hor_threshold, 1, 255);
112
	WSP_CLAMP(ptun->one_finger_tap, 0, 1);
110
}
113
}
111
114
112
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RW,
115
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RW,
Lines 121-126 Link Here
121
    &wsp_tuning.pressure_tap_threshold, 0, "tap pressure threshold");
124
    &wsp_tuning.pressure_tap_threshold, 0, "tap pressure threshold");
122
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_hor_threshold, CTLFLAG_RW,
125
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_hor_threshold, CTLFLAG_RW,
123
    &wsp_tuning.scr_hor_threshold, 0, "horizontal scrolling threshold");
126
    &wsp_tuning.scr_hor_threshold, 0, "horizontal scrolling threshold");
127
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, one_finger_tap, CTLFLAG_RW,
128
    &wsp_tuning.one_finger_tap, 0, "one finger tap toggle");
124
129
125
/*
130
/*
126
 * Some tables, structures, definitions and constant values for the
131
 * Some tables, structures, definitions and constant values for the
Lines 966-972 Link Here
966
				 */
971
				 */
967
				switch (sc->ntaps) {
972
				switch (sc->ntaps) {
968
				case 1:
973
				case 1:
969
					if (!(params->caps & HAS_INTEGRATED_BUTTON)) {
974
					if (tun.one_finger_tap > 0 ||
975
					    !(params->caps & HAS_INTEGRATED_BUTTON)) {
970
						wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN);
976
						wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN);
971
						DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n");
977
						DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n");
972
					}
978
					}

Return to bug 196624